Skip to main content
The OpenTelemetry source takes in logs, metrics, and traces, and has a separate output for each: Logs, Metrics, and Traces. It replaces three deprecated sources: OpenTelemetry Logs, OpenTelemetry Metrics, and OpenTelemetry Traces. The events the new source emits are shaped differently from those of the deprecated sources:
  • The deprecated sources convert each OpenTelemetry record into a Mezmo-specific event. The main payload (log body, metric, or span) goes in message, and the OpenTelemetry context (resource, scope, attributes) goes in metadata.
  • The OpenTelemetry source passes each record through in its original OpenTelemetry JSON form. Everything, including the resource and scope, is inside message.
Processors and destinations built for the deprecated sources won’t work with the OpenTelemetry source’s outputs unless you update their field paths or remap the events first.

At a glance

The OpenTelemetry source envelope

All three outputs share the same envelope. message.type is log, metric, or trace, and message.record holds the signal-specific fields:
  • annotations.app is set from the service.name resource attribute, or k8s.container.name if that isn’t set.
  • annotations.host is set from the k8s.pod.name resource attribute, or host.name if that isn’t set.
  • timestamp is set from the record’s time:

Logs

In the deprecated Logs source, metadata.resource holds resource attributes directly. In the deprecated Metrics and Traces sources, they’re nested under metadata.resource.attributes. In the OpenTelemetry source, they’re always at message.resource.attributes.

Metrics

Which fields appear in dataPoint depends on the metric type. The example above is a gauge. Sums, histograms, and summaries can carry other fields.

Traces

Migrating from the deprecated sources

When you replace the deprecated sources with the OpenTelemetry source:
  1. Add one OpenTelemetry source, and connect each downstream processor to its Logs, Metrics, or Traces output.
  2. Update the field paths your processors use, following the tables above. For example:
    • Logs: message becomes message.record.body
    • Metrics: message.name becomes message.record.metric.name
    • Traces: message.trace_id becomes message.record.traceId
    • All signals: metadata.resource… becomes message.resource.attributes…
  3. Convert values before doing math or numeric comparisons: metric values, *UnixNano times, and many attribute values arrive as strings.
  4. Check for anything that relies on fields the new source doesn’t set, such as annotations.level on logs or metadata.level on traces.
  5. If a destination expects Mezmo metric events, add a processor that remaps the OpenTelemetry metric fields to the Mezmo metric format first.