NLog.Target.Datadog 1.0.7

There is a newer version of this package available.
See the version list below for details.
dotnet add package NLog.Target.Datadog --version 1.0.7                
NuGet\Install-Package NLog.Target.Datadog -Version 1.0.7                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NLog.Target.Datadog" Version="1.0.7" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NLog.Target.Datadog --version 1.0.7                
#r "nuget: NLog.Target.Datadog, 1.0.7"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NLog.Target.Datadog as a Cake Addin
#addin nuget:?package=NLog.Target.Datadog&version=1.0.7

// Install NLog.Target.Datadog as a Cake Tool
#tool nuget:?package=NLog.Target.Datadog&version=1.0.7                

NLog.Target.DataDog

A NLog target that send events and logs staight away to Datadog. By default the sink sends logs over HTTPS

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

maxRetries

The number of retries to log to DataDog before giving up. Default: 10.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.11 61,733 1/20/2021
1.0.10 338 1/20/2021
1.0.9 360 1/19/2021
1.0.8 361 1/18/2021
1.0.7 344 1/18/2021
1.0.6 338 1/15/2021
1.0.5 338 1/15/2021
1.0.4 378 1/12/2021
0.3.0 456 1/8/2021