Skip to content

Commit 3a516a4

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Adds OpenTelemetry source support for metrics pipelines (#3580)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent a9609d4 commit 3a516a4

File tree

5 files changed

+79
-2
lines changed

5 files changed

+79
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44821,7 +44821,7 @@ components:
4482144821
Protocol (OTLP) over gRPC and HTTP.
4482244822

4482344823

44824-
**Supported pipeline types:** logs'
44824+
**Supported pipeline types:** logs, metrics'
4482544825
properties:
4482644826
grpc_address_key:
4482744827
description: Environment variable name containing the gRPC server address
@@ -44851,6 +44851,7 @@ components:
4485144851
type: object
4485244852
x-pipeline-types:
4485344853
- logs
44854+
- metrics
4485444855
ObservabilityPipelineOpentelemetrySourceType:
4485544856
default: opentelemetry
4485644857
description: The source type. The value should always be `opentelemetry`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2026-03-10T16:11:47.487Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "Observability Pipelines/Validate a metrics pipeline with opentelemetry source returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "fd62c635471ab911f21d26a9cd87afdc",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 499,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 582,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"config\":{\"destinations\":[{\"id\":\"datadog-metrics-destination\",\"inputs\":[\"my-processor-group\"],\"type\":\"datadog_metrics\"}],\"pipeline_type\":\"metrics\",\"processor_groups\":[{\"enabled\":true,\"id\":\"my-processor-group\",\"include\":\"*\",\"inputs\":[\"opentelemetry-source\"],\"processors\":[{\"enabled\":true,\"id\":\"filter-processor\",\"include\":\"env:production\",\"type\":\"filter\"}]}],\"sources\":[{\"id\":\"opentelemetry-source\",\"type\":\"opentelemetry\"}]},\"name\":\"Metrics OTel Pipeline\"},\"type\":\"pipelines\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/obs-pipelines/pipelines/validate"
39+
},
40+
"response": {
41+
"bodySize": 14,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 14,
45+
"text": "{\"errors\":[]}\n"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 370,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2026-03-10T16:11:48.649Z",
61+
"time": 211
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}

features/v2/observability_pipelines.feature

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ Feature: Observability Pipelines
149149
And the response "data.attributes.config.destinations" has length 1
150150
And the response "data.attributes.config.destinations[0].id" is equal to "updated-datadog-logs-destination-id"
151151

152+
@team:DataDog/observability-pipelines
153+
Scenario: Validate a metrics pipeline with opentelemetry source returns "OK" response
154+
Given new "ValidatePipeline" request
155+
And body with value {"data": {"attributes": {"config": {"pipeline_type": "metrics", "destinations": [{"id": "datadog-metrics-destination", "inputs": ["my-processor-group"], "type": "datadog_metrics"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "*", "inputs": ["opentelemetry-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "env:production", "type": "filter"}]}], "sources": [{"id": "opentelemetry-source", "type": "opentelemetry"}]}, "name": "Metrics OTel Pipeline"}, "type": "pipelines"}}
156+
When the request is sent
157+
Then the response status is 200 OK
158+
And the response "errors" has length 0
159+
152160
@team:DataDog/observability-pipelines
153161
Scenario: Validate an observability pipeline returns "Bad Request" response
154162
Given new "ValidatePipeline" request

services/observability_pipelines/src/v2/models/ObservabilityPipelineOpentelemetrySource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ObservabilityPipelineTls } from "./ObservabilityPipelineTls";
66
/**
77
* The `opentelemetry` source receives telemetry data using the OpenTelemetry Protocol (OTLP) over gRPC and HTTP.
88
*
9-
* **Supported pipeline types:** logs
9+
* **Supported pipeline types:** logs, metrics
1010
*/
1111
export class ObservabilityPipelineOpentelemetrySource {
1212
/**

0 commit comments

Comments
 (0)