emit_opentelemetry
Integrate emit with the OpenTelemetry SDK.
This library forwards diagnostic events from emit through the OpenTelemetry SDK as log records and spans.
It lets you use emit's ergonomic developer-oriented APIs in your OpenTelemetry-instrumented applications.
See the guide for more details on using emit.
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.31"
[]
= "0.31"
= ["trace", "logs"]
[]
= "0.31"
= ["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.
For more details on how to use emit once you've initialized it, see the guide, or examples in the main emit repository.
Versioning and compatibility
emit_opentelemetry version x.y.z is compatible with opentelemetry_sdk version x.y.*.