Skip to content

sevenmind/opentelemetry_logger_metadata_datadog

 
 

Repository files navigation

OpentelemetryLoggerMetadataDataDog

Adds OpenTelemetry trace identifiers to logs in the datadog format. i.e. adds {"dd": {"trace_id":12315400,"span_id":8944345}} to your logger metadata.

Logging into a json format with logger_json is recommended.

Installation

Elixir

The package can be installed by adding opentelemetry_logger_metadata_datadog to your list of dependencies in mix.exs:

def deps do
  [
    {:opentelemetry_logger_metadata_datadog, "~> 0.1.0"}
  ]
end

In your application start:

    def start(_type, _args) do
      OpentelemetryLoggerMetadataDataDog.setup()

      # ...
    end

Erlang

The package can be installed by adding opentelemetry_logger_metadata_datadog to your list of dependencies:

  {deps, [{opentelemetry_logger_metadata_datadog, "~> 0.1.0"}]}.

In your application start:

  opentelemetry_logger_metadata_datadog:setup()

or setup the logging filter yourself:

  logger:add_primary_filter(opentelemetry_logger_metadata_datadog, {fun opentelemetry_logger_metadata_datadog:filter/2, []}),

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 73.0%
  • Erlang 27.0%