Adds OpenTelemetry trace identifiers to logs.
The package can be installed by adding opentelemetry_logger_metadata
to your
list of dependencies in mix.exs
:
def deps do
[
{:opentelemetry_logger_metadata, "~> 0.1.0"}
]
end
In your application start:
def start(_type, _args) do
OpenTelemetry.register_application_tracer(:my_project)
OpentelemetryLoggerMetadata.setup()
# ...
end
The package can be installed by adding opentelemetry_logger_metadata
to your
list of dependencies:
{deps, [{opentelemetry_logger_metadata, "~> 0.1.0"}]}.
In your application start:
opentelemetry_logger_metadata:setup()
or setup the logging filter yourself:
logger:add_primary_filter(opentelemetry_logger_metadata, {fun opentelemetry_logger_metadata:filter/2, []}),