Serilog.Sinks.Datadog.Logs 0.1.4

Serilog Sink that sends log events to Datadog https://www.datadoghq.com/

There is a newer version of this package available.
See the version list below for details.
Install-Package Serilog.Sinks.Datadog.Logs -Version 0.1.4
dotnet add package Serilog.Sinks.Datadog.Logs --version 0.1.4
<PackageReference Include="Serilog.Sinks.Datadog.Logs" Version="0.1.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Serilog.Sinks.Datadog.Logs --version 0.1.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Serilog.Sinks.Datadog.Logs

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()
    .WriteTo.DatadogLogs("<API_KEY>")
    .CreateLogger();

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("intake.logs.datadoghq.com", 10516, true);
var log = new LoggerConfiguration()
    .WriteTo.DatadogLogs(
        "<API_KEY>",
        source: "<SOURCE_NAME>",
        service: "<SERVICE_NAME>",
        host: "<HOST_NAME>",
        tags: new string[] {"<TAG_1>:<VALUE_1>", "<TAG_2>:<VALUE_2>"},
        configuration: config
    )
    .CreateLogger();

Example

Sending the following log:

var log = new LoggerConfiguration()
    .WriteTo.DatadogLogs("<API_KEY>")
    .CreateLogger();

// 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
    }
}

Serilog.Sinks.Datadog.Logs

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()
    .WriteTo.DatadogLogs("<API_KEY>")
    .CreateLogger();

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("intake.logs.datadoghq.com", 10516, true);
var log = new LoggerConfiguration()
    .WriteTo.DatadogLogs(
        "<API_KEY>",
        source: "<SOURCE_NAME>",
        service: "<SERVICE_NAME>",
        host: "<HOST_NAME>",
        tags: new string[] {"<TAG_1>:<VALUE_1>", "<TAG_2>:<VALUE_2>"},
        configuration: config
    )
    .CreateLogger();

Example

Sending the following log:

var log = new LoggerConfiguration()
    .WriteTo.DatadogLogs("<API_KEY>")
    .CreateLogger();

// 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
    }
}

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Serilog.Sinks.Datadog.Logs:

Package Downloads
Prospa.Extensions.Hosting
.NET Core Hosting Extensions.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.3.3 123 9/24/2020
0.3.2 67,333 7/8/2020
0.3.1 150,728 1/29/2020
0.3.0 230,178 4/11/2019
0.2.0 39,218 2/5/2019
0.1.5 2,448 1/10/2019
0.1.4 6,353 11/2/2018
0.1.3 14,311 7/30/2018
Show less