Skip to content

surgeventures/opentelemetry_datadog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpentelemetryDatadog

OpenTelemetry DataDog Exporter and utilities for Elixir.

The main reason you would use this over exporting over the DataDog Agent over otlp is that this approach supports proper sampling.

Installation

def deps do
  [
    {:opentelemetry_datadog, git: "https://github.com/hansihe/opentelemetry_datadog.git"}
  ]
end

After installing, opentelemetry needs to be configured with the datadog exporter:

config :opentelemetry,
  traces_exporter: {OpentelemetryDatadog.Exporter, [host: "http://localhost", port: 8126]},
  resource: %{
    # Resources configuration go in here or are specified using env variables
    "service.name": "my-service",
    "deployment.environment": "production"
  },
  sampler: {OpentelemetryDatadog.Sampler.UseLocalSamplingRules, 0.5},
  text_map_propagators: [OpentelemetryDatadog.Propagator.Datadog]

The above config will:

  • Send traces to a DataDog agent running on localhost:8126
  • Randomly sample traces at a rate of 0.5, while accurately reporting sampling rates to DataDog
  • Setup a propagator that is compatible with the "x-datadog-*" headers

About

OpenTelemetry DataDog exporter and utilities for Elixir

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages