We are using datadog api client libraries, such as the python library, to ship metrics to the /api/v2/series endpoint.
We have verified that the v2 api spec and request that we are sending is correct according to the datadog documentation, however we are getting 400 response errors such as proto: illegal wireType 6 and proto: wrong wireType = 0 for field Points
When using the api/v1/series instead, we are able to successfully ship metrics using the datadog client api library.
This could be because it is trying to unmarshal directly into a protobuf message from the datadog agent payload, but this fails because the datadog api request body is json.
Steps to Reproduce
Try to ship metrics to the api/v2/series endpoint using the datadog api client library. Here is an example using the python library
See that a 400 response is returned with the above protobuf errors
Expected Result
The api/v2/series endpoint can accept json requests from the datadog api client libraries
Actual Result
Metric requests to the api/v2/series endpoint from the datadog api client library fail with the above protobuf errors.
Component(s)
receiver/datadog
What happened?
Description
We are using datadog api client libraries, such as the python library, to ship metrics to the
/api/v2/series
endpoint.We have verified that the v2 api spec and request that we are sending is correct according to the datadog documentation, however we are getting 400 response errors such as
proto: illegal wireType 6
andproto: wrong wireType = 0 for field Points
When using the
api/v1/series
instead, we are able to successfully ship metrics using the datadog client api library.Looking in our logs and at the code, we see that these requests are likely failing here https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/datadogreceiver/internal/translator/series.go#L38-L41.
This could be because it is trying to unmarshal directly into a protobuf message from the datadog agent payload, but this fails because the datadog api request body is json.
Steps to Reproduce
api/v2/series
endpoint using the datadog api client library. Here is an example using the python libraryExpected Result
The
api/v2/series
endpoint can accept json requests from the datadog api client librariesActual Result
Metric requests to the
api/v2/series
endpoint from the datadog api client library fail with the above protobuf errors.Collector version
v0.112.0
Environment information
Environment
OpenTelemetry Collector configuration
No response
Log output
Additional context
No response