r/rust•
dataplayer

Tokio tracing with Honeycomb

Is anyone using tokio’s tracing crate to successfully send logs to Honeycomb? If anyone can point me to a working example I would really appreciate it.

Posted Dec 23, 2023, 4:18 PM UTC

64
KingofGamesYami•

It looks like honeycomb supports OTLP so I'd use open telemetry with tracing compat and OTLP exporter. Never used honeycomb specifically but this works with other OTLP-compatible services.

4
dataplayerOP•

Can you expand on what exactly you mean by using “open telemetry with tracing compat and OTLP exporter”. Some of this is kinda new to me.

1
KingofGamesYami•

OpenTelemetry - https://docs.rs/opentelemetry/latest/opentelemetry - is a framework for collecting telemetry data. It has plugins for writing data to various sources.

Tracing maintains a library https://docs.rs/tracing-opentelemetry/latest/tracing_opentelemetry - which can integrate tracing data with opentelemetry.

OpenTelemetry Protocol (OTLP) is a protocol specified by OpenTelemetry for others to implement support for ingesting data produced by the framework. There is a library - https://docs.rs/opentelemetry-otlp/latest/opentelemetry_otlp - which configures the OpenTelemetry framework to use this format to export data.

9
dataplayerOP•

Exactly the expectation I was looking for! Thank You!

2