Teleplug (teleplug v2.1.0)

View Source

Simple opentelementry instrumented plug.

Summary

Types

Configuration options for Teleplug

How to handle trace propagation headers

Types

opts()

@type opts() :: [{:trace_propagation, trace_propagation_opt()}]

Configuration options for Teleplug

  • trace_propagation_opt(default: :as_parent) - configure how trace propagation works.

trace_propagation_opt()

@type trace_propagation_opt() :: :as_parent | :as_link | :disabled

How to handle trace propagation headers:

  • :as_parent set the propagated trace span as a parent for the request handler span. Note that if the parent span doesn't exist your trace might be dropped by the opentelemetry collector. If that behaviour is undesirable(eg. when using a public endpoint) you should use the :as_link option.
  • :as_link create a link between the propagated span and the request handler span.
  • :disabled disable trace propagation.

Functions