OpenTelemetry

Endpoint

otel

URL

https://${OBSERVE_CUSTOMER}.collect.observeinc.com/v2/otel

Maximum Request Size (compressed)

10 MB

Maximum Request Size (uncompressed)

50 MB

Global Individual Observation Limit

4 MB

Global Individual Metric, Span, or Event Limit (including attributes and resource attributes)

1 MB

Observe implements the write-only HTTP endpoint for OpenTelemetry as defined by the OpenTelemetry Protocol Definition and supports the following observation types:

Type

URL Suffix

Protocol Status

Traces

v1/traces

stable

Metrics

v1/metrics

stable

Logs

v1/logs

stable

The request body should be encoded in the Protobuf format and sent with the content-type application/x-protobuf. GRPC ingestion is not supported for the OpenTelemetry endpoint.

OpenTelemetry Collector

To send data using the OpenTelemetry Collector, you need to authenticate with the endpoint using a Datastream Token attached as an http authorization header.

Prerequisite: You must configure a datastream and token before proceeding.

Note

The bearer token format used for datastreams is different than that used by authentication tokens.

Use the following configuration snippets as a guide:

exporters:
  ...
  otlphttp:
    endpoint: "https://${OBSERVE_CUSTOMER}.collect.observeinc.com/v2/otel"
    headers:
      authorization: "Bearer ${OBSERVE_TOKEN}"
service:
  ...
  pipelines:
    traces:
      ...
      exporters: [otlphttp]

Histogram metrics

OpenTelemety histogram metrics are not supported. If you use OpenTelemetry histogram metrics, we recommend using Prometheus metrics instead for sending OpenTelemetry metrics. We recommend using Prometheus Remote Write Exporter in your Observe Agent config or OpenTelemetry config to convert your metrics to prometheus format and send to our prometheus metrics endpoint.

Use otel_config_overrides section to configure Prometheus Remote Write Exporter to send Prometheus histogram metrics. Replace ${OBSERVE_TOKEN} (your instance’s token) and ${OBSERVE_COLLECTION_ENDPOINT} (your instance’s collection endpoint) on each host. For more information on configuring the agent, see Configuration.

otel_config_overrides:
  exporters:
    prometheusremotewrite:
      # (ex: https://123456789012.collect.observeinc.com/v1/prometheus)
      endpoint: "${OBSERVE_COLLECTION_ENDPOINT}/v1/prometheus"
      headers:
        # (ex: Bearer a1b2c3d4e5f6g7h8i9k0:l1m2n3o4p5q6r7s8t9u0v1w2x3y4z5a6)
        authorization: "Bearer ${OBSERVE_TOKEN}"
      resource_to_telemetry_conversion:
        enabled: true # Convert resource attributes to metric labels
      send_metadata: true
  service:
    pipelines:
      metrics/forward:
        receivers: [otlp]
        processors: [resourcedetection, resourcedetection/cloud]
        exporters: [prometheusremotewrite]
      metrics/host_monitoring_host:
        receivers: [hostmetrics/host-monitoring-host]
        processors: [memory_limiter, resourcedetection, resourcedetection/cloud, batch]
        exporters: [prometheusremotewrite]
      # metrics/host_monitoring_process:
      #   receivers: [hostmetrics/host-monitoring-process]
      #   processors: [memory_limiter, resourcedetection, resourcedetection/cloud, batch]
      #   exporters: [prometheusremotewrite]
      metrics/agent-filestats:
        receivers: [filestats/agent]
        processors: [resourcedetection, resourcedetection/cloud]
        exporters: [prometheusremotewrite]
      metrics/agent-internal:
        receivers: [prometheus/agent, count]
        processors: [memory_limiter, transform/truncate, resourcedetection, resourcedetection/cloud, batch]
        exporters: [prometheusremotewrite]

If you are collecting process metrics, use the following configuration.

otel_config_overrides:
  exporters:
    prometheusremotewrite:
      # (ex: https://123456789012.collect.observeinc.com/v1/prometheus)
      endpoint: "${OBSERVE_COLLECTION_ENDPOINT}/v1/prometheus"
      headers:
        # (ex: Bearer a1b2c3d4e5f6g7h8i9k0:l1m2n3o4p5q6r7s8t9u0v1w2x3y4z5a6)
        authorization: "Bearer ${OBSERVE_TOKEN}"
      resource_to_telemetry_conversion:
        enabled: true # Convert resource attributes to metric labels
      send_metadata: true
  service:
    pipelines:
      metrics/forward:
        receivers: [otlp]
        processors: [resourcedetection, resourcedetection/cloud]
        exporters: [prometheusremotewrite]
      metrics/host_monitoring_host:
        receivers: [hostmetrics/host-monitoring-host]
        processors: [memory_limiter, resourcedetection, resourcedetection/cloud, batch]
        exporters: [prometheusremotewrite]
      metrics/host_monitoring_process:
        receivers: [hostmetrics/host-monitoring-process]
        processors: [memory_limiter, resourcedetection, resourcedetection/cloud, batch]
        exporters: [prometheusremotewrite]
      metrics/agent-filestats:
        receivers: [filestats/agent]
        processors: [resourcedetection, resourcedetection/cloud]
        exporters: [prometheusremotewrite]
      metrics/agent-internal:
        receivers: [prometheus/agent, count]
        processors: [memory_limiter, transform/truncate, resourcedetection, resourcedetection/cloud, batch]
        exporters: [prometheusremotewrite]

Use the following configuration snippets as a guide:

exporters:
  ...
  prometheusremotewrite:
    # (ex: https://123456789012.collect.observeinc.com/v1/prometheus)
    endpoint: "${OBSERVE_COLLECTION_ENDPOINT}/v1/prometheus"
    headers:
      # (ex: Bearer a1b2c3d4e5f6g7h8i9k0:l1m2n3o4p5q6r7s8t9u0v1w2x3y4z5a6)
      authorization: "Bearer ${OBSERVE_TOKEN}"
    resource_to_telemetry_conversion:
      enabled: true # Convert resource attributes to metric labels
    send_metadata: true
...
service:
  ...
  pipelines:
    metrics:
      ...
      exporters: [prometheusremotewrite]

Send OpenTelemetry traces directly to Observe

If you want to bypass the OpenTelemetry Collector and test the endpoint directly, you must specify the URL and the relevant suffix. For instance, traces should be sent to the following URL:

https://${OBSERVE_CUSTOMERID}.collect.observeinc.com/v2/otel/v1/traces

Again, you need an Observe token for authentication as in this example:

https://${OBSERVE_CUSTOMERID}.collect.observeinc.com/v2/otel/v1/traces \
-H "Authorization: Bearer ab1cdE2FGhiJKlmnop34Q:rstUv5w6Xy7z8AB_CdeFg9h0iJK1mnOPqr" \
-d @sample_trace.json