View Source Sibyl.Handlers.OpenTelemetry (Sibyl v0.1.0)

OpenTelemetry is an open source standard telemetry standard which allows us to capture custom metrics and traces of our application.

For local development, you can install tools such as Jaeger to be able to view and test OpenTelemetry traces.

However, much of the BEAM ecosystem (and this library) uses :telemetry as a standard for emitting arbitrary telemetry events.

This handler is a bridge between standard :telemetry span events and OpenTelemetry spec compliant traces.

  • Any event which ends in :start will start an OpenTelemetry span context.

  • Any event which ends in :stop or :exception will stop the currently active OpenTelemetry span context, capturing any metadata that is passed in.

  • Any event which ends in anything else will be attached as a custom event to the currently active span context.