How do I line up Datadog monitors with OpenTelemetry metric series on one timeline?
Tares lines them up by giving both sources the same primary service label, so Datadog monitor alerts and OpenTelemetry metric points for one service merge on one clock in Explore. Datadog reaches Tares through the webhook connector and a Datadog-side setup, and your OpenTelemetry metrics arrive through the otlp connector. The alert shows what fired, and the metric points beside it show how the service got there.
How it works
Tares joins sources on a shared label. Mark a label named service as primary on every source, and all of that service’s events land on one timeline, ordered on one clock.
- Metrics: the otlp connector receives OTLP/HTTP metrics at
/v1/metrics. One source ingests every service. The service name comes from the resource attributeservice.name, so the label readsresourceAttributes.service.name. OTLP events have no bare service field, so a label withfield: servicegets no value on this source. - Alerts: Tares has no connector of its own for Datadog today. A Datadog webhook posts the monitor alert to the ingest URL of a webhook source, which stores the payload lossless. You write the payload in Datadog, so you decide which fields it carries, and one of them is the service name.
- The join: the otlp source and the webhook source both mark a label named service as primary. Only the field path differs:
resourceAttributes.service.nameon OTLP, and the top-levelservicefield of your payload on the webhook source.
This is the same per-service correlation described in AI SRE, where alerts, metrics and logs share one timeline per service.
Set it up
-
Start Tares and open the console.
tares up -
Create the OTLP source under Sources, Add source, otlp. There is no required config except the label.
- name: otel connector: otlp config: labels: - { name: service, field: resourceAttributes.service.name, primary: true } -
Point your exporter at Tares. Set the endpoint on your app or OpenTelemetry Collector. On a secured instance (
tares up --auth), the exporter also sends an ingest-scoped API key as a Bearer Authorization header.OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:8787 # OTLP/HTTP → /v1/{logs,traces,metrics} # or gRPC (otlp-grpc extra): OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 -
Create the webhook source for Datadog under Sources, Add source, webhook. Declare the same service label, read from the top-level
servicefield of your payload, and mark it primary. Keep the payload flat, becauseevent_type_fieldandtext_templateread top-level fields only. Name the source whatever you like.- name: datadog-monitors connector: webhook config: labels: - { name: service, field: service, primary: true } -
Add the webhook in Datadog. Open the Webhooks integration and add a webhook whose URL is the ingest URL of the Tares source (
/ingest/followed by the ingest key from the source page). Write the payload as JSON from Datadog variables such as$ALERT_ID,$EVENT_MSGand$LINK, and include aservicefield holding the same service name your OpenTelemetry resource reports. When Tares has auth on, add custom headers as JSON with an Authorization Bearer header holding an ingest-scoped API key. -
Call it from the monitor. Put
@webhook-followed by the webhook’s name in the monitor message, so the monitor posts to Tares when it fires. -
Verify. On each source page, Recent events shows what arrives, and Fields shows which payload fields come through and how often. If the payload carries an ISO-8601 timestamp, you can set
event_time_fieldon the webhook source so the alert is placed at the time it carries. In Explore, pick the service under theservicekey. The Datadog alert and the metric points appear on one clock.
What you get
- One timeline per service that holds the Datadog monitor alert and the OpenTelemetry metric points around it, in time order.
- No per-service setup on the metrics side. The one otlp source covers every service your exporters report, because the service name comes from the resource attributes.
- A correlated read for anyone investigating. A connected agent or you in Explore starts from the alert and the surrounding metrics together instead of switching between two tools.
- Datadog keeps owning alerting. Tares ingests what fired and correlates it with the evidence, and nothing is re-thresholded in Tares.
The join only works when both sides report the same service name. If the Datadog payload says one name and the OpenTelemetry resource says another, they land on separate timelines, so check the values in Fields.
When something else fits
- If your metrics live in a Prometheus server rather than an OpenTelemetry pipeline, the prometheus connector polls the series you pick and stores each value as a number-typed
valuelabel that triggers can aggregate. Key it by the same service label. - If the alerts come from another vendor or from your own tooling, the same webhook pattern applies: a source with a primary service label and a producer that posts JSON to the ingest URL.
- If you only need the alert stream and no metrics, the webhook source alone is enough. Add the otlp source when you want the metric context beside it.