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

Event structure.

Honeycomb events bind a timestamp to data as described in t/0 below. The data corresponds to OpenTelemetry span attributes, with limitations dictated by the intersection of their data data models. For information on how we clean and flatten span attributes before sending them, see OpenTelemetry.Honeycomb.Attributes.

Honeycomb event attributes for trace handling can collide with other attributes. For information on the defaults and how to change them, see OpenTelemetry.Honeycomb.Config.AttributeMap.

Link to this section Summary

Types

Span attributes after flattening.

t()

Honeycomb event suitable for POSTing to their batch API.

Functions

Convert one OpenTelemetry span to an event suitable for POSTing to the Honeycomb Events API.

The current UTC time in ISO 8601 format, e.g. "2019-05-17T09:55:12.622658Z"

Link to this section Types

Link to this type

event_data()

View Source
event_data() :: %{optional(String.t()) => OpenTelemetry.attribute_value()}

Span attributes after flattening.

Link to this type

t()

View Source
t() :: %OpenTelemetry.Honeycomb.Event{
  data: event_data(),
  samplerate: pos_integer(),
  time: String.t()
}

Honeycomb event suitable for POSTing to their batch API.

  • time: ms since epoch; MUST be in ISO 8601 format, e.g. "2019-05-17T09:55:12.622658Z"
  • data: event_data/0 after flattening.
  • samplerate: the sample rate, as a positive integer; 1_000 describes a 1:1000 ratio.

Link to this section Functions

Link to this function

from_otel_span(otel_span, resource_attributes, attribute_map)

View Source
from_otel_span(
  :opentelemetry.span(),
  resource_attributes :: OpenTelemetry.attributes(),
  attribute_map :: OpenTelemetry.Honeycomb.Config.AttributeMap.t()
) :: [t()]

Convert one OpenTelemetry span to an event suitable for POSTing to the Honeycomb Events API.

The current UTC time in ISO 8601 format, e.g. "2019-05-17T09:55:12.622658Z"

Useful when creating events manually.