View Source otel_span_processor behaviour (opentelemetry v1.5.0)

Behaviour each Span Processor must implement.

Summary

Functions

Starts a span processor.

Types

-type processor_config() :: term().

Callbacks

-callback force_flush(processor_config()) -> ok | {error, term()}.
-callback on_end(opentelemetry:span(), processor_config()) ->
          true | dropped | {error, invalid_span} | {error, no_export_buffer}.
-callback on_start(otel_ctx:t(), opentelemetry:span(), processor_config()) -> opentelemetry:span().
Link to this callback

processor_init/2

View Source (optional)
-callback processor_init(pid(), processor_config()) -> processor_config().

Functions

Link to this function

start_link(Module, Config)

View Source
-spec start_link(module(), Config) -> {ok, pid(), Config} | {error, term()}
              when Config :: processor_config().

Starts a span processor.

Module must implement the otel_span_processor behaviour. This function calls Module:start_link/1 with Config as the argument.