NLog.Target.Datadog
1.0.11
dotnet add package NLog.Target.Datadog --version 1.0.11
NuGet\Install-Package NLog.Target.Datadog -Version 1.0.11
<PackageReference Include="NLog.Target.Datadog" Version="1.0.11" />
paket add NLog.Target.Datadog --version 1.0.11
#r "nuget: NLog.Target.Datadog, 1.0.11"
// Install NLog.Target.Datadog as a Cake Addin #addin nuget:?package=NLog.Target.Datadog&version=1.0.11 // Install NLog.Target.Datadog as a Cake Tool #tool nuget:?package=NLog.Target.Datadog&version=1.0.11
NLog.Target.DataDog
A NLog target that send events and logs staight away to Datadog. By default the sink sends logs over HTTPS.
It does so in batches which is more optimal way as compared to the WebService
target.
Package - NLog.Target.DataDog | Platforms - .NET 4.5, .NET 4.6.1, .NET 4.7.2, netstandard1.3, netstandard2.0
Note: For other .NET versions, ensure that the default TLS version used is 1.2
Parameters
url
The url of DataDog intake service. Default: https://http-intake.logs.datadoghq.com
UseTCP
If TCP instead HTTP to be used. Default: false
UseSSL
if using TCP
, if to use SSL
DDPort
if using TCP
, the secure (SSL) port
DDPortNoSSL
if using TCP
, the insecure (no SSL) port
apiKey
Your API key.
You can also add the following properties: source, service, host, tags.
Confifuration
- Example with HTTP (replace "YOUR API KEY" with your DataDog API key):
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
</configSections>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<extensions>
<add assembly="NLog.Target.Datadog" />
</extensions>
<targets>
<default-wrapper xsi:type="AsyncWrapper" overflowAction="Grow" timeToSleepBetweenBatches="1"
/>
<target xsi:type="DataDog"
name="dataDog"
layout="${message}"
includeAllProperties="true"
apiKey="YOUR API KEY">
<field name="ddsource" layout="${machinename}" />
<field name="service" layout="${machinename}" />
<field name="host" layout="${machinename}" />
<field name="Logger" layout="${logger}" />
<field name="ProcessID" layout="${processid}" />
<field name="ProcessName" layout="${processname}" />
<field name="Thread" layout="${threadid}" />
<field name="ThreadName" layout="${threadname}" />
<field name="Class"
layout="${callsite:className=true:methodName=false:fileName=false:includeSourcePath=false}" />
<field name="Method"
layout="${callsite:className=false:methodName=true:fileName=false:includeSourcePath=false}" />
<field name="sessionId" layout="12345" />
<field name="Version" layout="${gdc:item=Version}" />
<field name="Environment" layout="${gdc:item=Version}" />
</target>
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="dataDog" />
</rules>
</nlog>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.3 is compatible. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5
- Newtonsoft.Json (>= 11.0.2)
- NLog (>= 4.6.6)
- System.Net.Http (>= 4.3.4)
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 11.0.2)
- NLog (>= 4.6.6)
- System.Net.Http (>= 4.3.4)
- System.Net.Security (>= 4.3.2)
- System.Net.Sockets (>= 4.3.0)
- System.Threading.Thread (>= 4.3.0)
-
.NETStandard 2.0
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 2.1.1)
- Newtonsoft.Json (>= 11.0.2)
- NLog (>= 4.6.6)
- System.Net.Http (>= 4.3.4)
- System.Net.Security (>= 4.3.2)
- System.Net.Sockets (>= 4.3.0)
- System.Threading (>= 4.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.