View Source otel_id_generator behaviour (opentelemetry v1.3.0)

This module provides the behaviour to implement for custom trace and span id generation and the default implementation of the generators which produces random 128 bit and 64 bit integers for the trace id and span id.

Link to this section Summary

Functions

Generates a 64 bit random integer to use as a span id.
Calls a module implementing the otel_id_generator behaviour to generate a span id
Generates a 128 bit random integer to use as a trace id.
Calls a module implementing the otel_id_generator behaviour to generate a trace id

Link to this section Types

-type t() :: module().

Link to this section Callbacks

-callback generate_span_id() -> opentelemetry:span_id().
-callback generate_trace_id() -> opentelemetry:trace_id().

Link to this section Functions

-spec generate_span_id() -> opentelemetry:span_id().
Generates a 64 bit random integer to use as a span id.
Link to this function

generate_span_id(Module)

View Source
-spec generate_span_id(t()) -> opentelemetry:span_id().
Calls a module implementing the otel_id_generator behaviour to generate a span id
-spec generate_trace_id() -> opentelemetry:trace_id().
Generates a 128 bit random integer to use as a trace id.
Link to this function

generate_trace_id(Module)

View Source
-spec generate_trace_id(t()) -> opentelemetry:trace_id().
Calls a module implementing the otel_id_generator behaviour to generate a trace id