Skip to content
Serilog Sink that sends log events to Datadog
Branch: master
Clone or download
Pull request Compare This branch is 24 commits behind DataDog:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A Serilog sink that send events and logs staight away to Datadog. By default the sink will use a TCP connection over SSL.

Package - Serilog.Sinks.Datadog.Logs | Platforms - .NET 4.5.1, netstandard1.3, netstandard2.0

var log = new LoggerConfiguration()

You can override the default behavior by manually specifing the following properties (endpoint, port, useSSL).

You can also add the following properties (source, service, host, tags) to the Serilog sink.

var config = new DatadogConfiguration("", 10516, true);
var log = new LoggerConfiguration()
        source: "<SOURCE_NAME>",
        service: "<SERVICE_NAME>",
        host: "<HOST_NAME>",
        tags: new string[] {"<TAG_1>:<VALUE_1>", "<TAG_2>:<VALUE_2>"},
        configuration: config


Sending the following log:

var log = new LoggerConfiguration()

// An example
var position = new { Latitude = 25, Longitude = 134 };
var elapsedMs = 34;

log.Information("Processed {@Position} in {Elapsed:000} ms.", position, elapsedMs);

In the platform, the log looks like as the following JSON Object:

    "MessageTemplate": "Processed {@Position} in {Elapsed:000} ms.",
    "Level": "Information",
    "Timestamp": "2016-09-02T15:02:29.648Z",
    "Renderings": {
        "Elapsed": [{
            "Format": "000",
            "Rendering": "034"
    "Properties": {
        "Position": {
            "Latitude": 25,
            "Longitude": 134
        "Elapsed": 34

How to build the NuGet package

Bump the version in src/Serilog.Sinks.Datadog.Logs.csproj and merge your branch

Run these commands in the project root folder

git checkout master && git pull
msbuild Serilog.Sinks.Datadog.Logs.sln /t:restore /p:Configuration=Release
msbuild Serilog.Sinks.Datadog.Logs.sln /t:pack /p:Configuration=Release

You can find the .nupkg file at bin/Release/Serilog.Sinks.Datadog.Logs.<version>.nupkg

You can’t perform that action at this time.