Documentation

DatadogHandler extends AbstractProcessingHandler
in package

Sends logs to Datadog Logs using Curl integrations

You'll need a Datzdog account to use this handler.

Tags
see
https://docs.datadoghq.com/logs/

Datadog Logs Documentation

Table of Contents

Constants

DATADOG_LOG_HOST  = 'https://http-intake.logs.datadoghq.com'
Datadog Api Key access

Properties

$apiKey  : string
Datadog Api Key access
$attributes  : array<string|int, mixed>
Datadog's optionals attributes

Methods

__construct()  : mixed
getApiKey()  : string
Get Datadog Api Key from $attributes params.
getDefaultFormatter()  : FormatterInterface
Returns the default formatter to use with this handler
getHostname()  : string
Get Datadog Hostname from $attributes params.
getService()  : string
Get Datadog Service from $attributes params.
getSource()  : string
Get Datadog Source from $attributes params.
getTags()  : string
Get Datadog Tags from $attributes params.
send()  : mixed
Send request to @link https://http-intake.logs.datadoghq.com on send action.
write()  : void
Handles a log record

Constants

DATADOG_LOG_HOST

Datadog Api Key access

protected string DATADOG_LOG_HOST = 'https://http-intake.logs.datadoghq.com'

Properties

$attributes

Datadog's optionals attributes

private array<string|int, mixed> $attributes

Methods

__construct()

public __construct(string $apiKey[, array<string|int, mixed> $attributes = [] ][, int $level = Logger::DEBUG ][, bool $bubble = true ]) : mixed
Parameters
$apiKey : string

Datadog Api Key access

$attributes : array<string|int, mixed> = []

Some options fore Datadog Logs

$level : int = Logger::DEBUG

The minimum logging level at which this handler will be triggered

$bubble : bool = true

Whether the messages that are handled can bubble up the stack or not

Tags
throws
Exception

getApiKey()

Get Datadog Api Key from $attributes params.

protected getApiKey(string $apiKey) : string
Parameters
$apiKey : string
Tags
throws
Exception
Return values
string

getDefaultFormatter()

Returns the default formatter to use with this handler

protected getDefaultFormatter() : FormatterInterface
Return values
FormatterInterface

getHostname()

Get Datadog Hostname from $attributes params.

protected getHostname() : string
Return values
string

getService()

Get Datadog Service from $attributes params.

protected getService(string $record) : string
Parameters
$record : string
Return values
string

getSource()

Get Datadog Source from $attributes params.

protected getSource() : string
Return values
string

getTags()

Get Datadog Tags from $attributes params.

protected getTags() : string
Return values
string

send()

Send request to @link https://http-intake.logs.datadoghq.com on send action.

protected send(string $record) : mixed
Parameters
$record : string

write()

Handles a log record

protected write(array<string|int, mixed> $record) : void
Parameters
$record : array<string|int, mixed>

        
On this page

Search results