opentelemetry_honeycomb v0.5.0-rc.1 OpenTelemetry.Honeycomb.Config View Source

Configuration.

A compact config/config.exs for opentelemetry_honeycomb is:

use Config

# You can also supply opentelemetry resources using environment variables, eg.:
# OTEL_RESOURCE_ATTRIBUTES=service.name=name,service.namespace=namespace

config :opentelemetry, :resource,
  service: [
    name: "service-name",
    namespace: "service-namespace"
]

config :opentelemetry,
  processors: [
    otel_batch_processor: %{
      exporter:
        {OpenTelemetry.Honeycomb.Exporter, write_key: System.get_env("HONEYCOMB_WRITEKEY")}
    }
  ]

processors specifies otel_batch_processor, which specifies exporter, a 2-tuple of the exporter's module name and options to be supplied to its init/1. Our exporter takes a list of OpenTelemetry.Honeycomb.Config.config_opt/0 as its options.

Link to this section Summary

Types

Configuration option for the OpenTelemetry Honeycomb exporter, giving

t()

A keyword list of configuration options for the OpenTelemetry Honeycomb exporter.

Functions

Get the default configuration for the OpenTelemetry Honeycomb exporter.

Link to this section Types

Link to this type

config_opt()

View Source
config_opt() ::
  {:api_endpoint, String.t()}
  | {:attribute_map, OpenTelemetry.Honeycomb.Config.AttributeMap.t()}
  | {:dataset, String.t()}
  | {:write_key, String.t() | nil}
  | OpenTelemetry.Honeycomb.Http.config_opt()
  | OpenTelemetry.Honeycomb.Json.config_opt()

Configuration option for the OpenTelemetry Honeycomb exporter, giving:

  • api_endpoint: the API endpoint
  • attribute_map: a map to control dataset attributes used for span properties (see below)
  • dataset: the Honeycomb dataset name
  • http_module: the HTTP back end module (see Http)
  • http_options: options to pass to the HTTP back end (see Http)
  • json_module: the HTTP back end module (see Json)
  • write_key: the write key

If the write_key is absent or nil, the exporter replaces your http_module with OpenTelemetry.Honeycomb.Http.WriteKeyMissingBackend to prevent spamming Honeycomb with unauthenticated requests.

A keyword list of configuration options for the OpenTelemetry Honeycomb exporter.

Link to this section Functions

Get the default configuration for the OpenTelemetry Honeycomb exporter.