emit_opentelemetry
Integrate emit with the OpenTelemetry SDK.
This library forwards diagnostic events from emit through the OpenTelemetry SDK as log records and spans.
Getting started
Configure the OpenTelemetry SDK as per its documentation, then add emit and emit_opentelemetry to your Cargo.toml:
[]
= "1"
# add `emit_openetelemetry` with the same major/minor as the OpenTelemetry SDK
[]
= "0.29"
[]
= "0.29"
= ["trace", "logs"]
[]
= "0.29"
= ["trace", "logs"]
Initialize emit to send diagnostics to the OpenTelemetry SDK using the emit_opentelemetry::setup function:
This function accepts a LoggerProvider and TracerProvider from the OpenTelemetry SDK to forward emit events to.
Versioning and compatibility
emit_opentelemetry version x.y.z is compatible with opentelemetry_sdk version x.y.*.