Module pavex_tracing::fields

source ·
Expand description

Utilities to log common resources with consistent naming and representations.

For well-known resources, this module exposes:

  • A constant holding the conventional field name used when logging that resource
  • A function to compute the conventional log representation of that resource in the context of an HTTP API

For example, you have HTTP_REQUEST_METHOD and http_request_method for the http.request.method field.

The naming follows OpenTelemetry’s semantic convention whenever possible.

§Exhaustiveness

The module doesn’t cover the entirety of OpenTelemetry’s semantic convention specification.
Feel free to open a PR if you need a stable field that isn’t currently covered!

Constants§

Functions§