Skip to content

New-PodeLogDatadogMethod

SYNOPSIS

Creates a new Datadog Log Method.

SYNTAX

New-PodeLogDatadogMethod [[-Id] <String>] [-BaseUrl] <String> [-ApiKey] <String> [[-Tags] <Hashtable>]
 [[-Service] <String>] [[-Source] <String>] [[-BatchInfo] <Hashtable>] [-SkipCertificateCheck]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Creates a new Datadog Log Method for outputting log items to a Datadog's HTTP v2 logging API endpoint.

EXAMPLES

EXAMPLE 1

' -Source 'my_source'

EXAMPLE 2

$batchInfo = New-PodeLogBatchInfo -Size 10 -Timeout 10
$methodId = New-PodeLogDatadogMethod -BaseUrl 'https://http-intake.logs.datadoghq.eu' -ApiKey '<api_key>' -Tags @{ env = 'prod' } -BatchInfo $batchInfo

EXAMPLE 3

' -Service 'my_service' -Source 'my_source' -SkipCertificateCheck

PARAMETERS

-ApiKey

The API key used for authenticating with the Datadog API.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BaseUrl

The base URL of the Datadog API endpoint, e.g., 'https://http-intake.logs.datadoghq.com'.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BatchInfo

An optional hashtable containing batch configuration for writing log items in bulk. Should be created using New-PodeLogBatchInfo.

Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id

An optional ID to assign to the Log Method. If not supplied, a random ID will be generated.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Service

An optional service name to include with the log items. (Default: the server's AppName)

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipCertificateCheck

If supplied, the API request will skip certificate validation checks.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Source

An optional source name to include with the log items.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tags

An optional hashtable of tags to include with the log items.

Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.String

NOTES