otel_exporter_otlp (opentelemetry_exporter v1.9.0)

View Source

A module of functionality shared between OTLP exporters for the various signals.

Summary

Types

compression/0

-type compression() :: gzip.

endpoint/0

-type endpoint() :: uri_string:uri_string() | uri_string:uri_map().

endpoint_map/0

-type endpoint_map() ::
          #{scheme := unicode:chardata(),
            host := unicode:chardata(),
            path => unicode:chardata(),
            port => integer(),
            ssl_options => []}.

headers/0

-type headers() :: [{unicode:chardata(), unicode:chardata()}].

opts/0

-type opts() ::
          #{endpoints => [endpoint()],
            headers => headers(),
            protocol => protocol(),
            ssl_options => list()}.

protocol/0

-type protocol() :: grpc | http_protobuf | http_json.

state/0

-type state() ::
          #{channel := term() | undefined,
            httpc_profile := atom() | undefined,
            protocol := protocol(),
            channel_pid := pid() | undefined,
            headers := headers(),
            compression := compression() | undefined,
            grpc_metadata := map() | undefined,
            endpoints := [endpoint_map()]}.

Functions

endpoints(List, DefaultSSLOpts)

-spec endpoints([endpoint()], list() | undefined) -> [endpoint_map()].

export_grpc(GrpcCtx, GrpcServiceModule, Metadata, Request, Channel)

export_http(Address, Headers, Body, Compression, SSLOptions, HttpcProfile)

Export OTLP protocol telemery data to the configured endpoints.

init(Opts)

-spec init(opts()) -> {ok, state()}.

Initialize the exporter based on the provided configuration.

merge_with_environment(ConfigMapping, AppEnv, Opts, SignalEndpointConfigKey, SignalHeadersConfigKey, SignalProtocolConfigKey, SignalCompressionConfigKey, DefaultPath)