Skip to main content

Telemetry

At Tailcall, we adhere to high observability standards in line with the OpenTelemetry specification. Our implementation utilizes several key Rust crates:

  • rust-opentelemetry and associated crates are used to support the collection and export of telemetry data.
  • tracing and tracing-opentelemetry facilitate the definition of logs and traces. Integration with OpenTelemetry allows for the automatic transfer of this data to the OpenTelemetry system. This layered approach ensures that the tracing library, which is effective across various scenarios, can also function as a standalone telemetry system for logging when OpenTelemetry integration is not required.

When developing any features that necessitate observability, consider the following guidelines:

  • Implement traces for tasks that represent a significant operation. This practice aids in the efficient diagnosis of issues and performance bottlenecks.
  • Name spans clearly and specifically, adhering to the guidelines outlined in the OpenTelemetry specifications. Avoid names that introduce a high cardinality of potential values.
  • Due to the constraints of tracing libraries, span names must be static strings. This limitation can be overcome by adding an extra field named otel.name to provide more dynamic descriptions (see the tracing-opentelemetry documentation for more details).
  • Attribute naming should follow OpenTelemetry's semantic conventions. Utilize constants available in the opentelemetry_semantic_conventions crate for standardized attribute names.