-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
datadog_agent source incompatible with opentelemetry-collector datadogexporter client v2 (JSON vs Protobuf) #16121
Comments
I reproduced this earlier today and confirmed. |
Any updates on this @davidhuie-dd? |
👋 I am starting to look into this today |
I confirmed that vector is attempting to parse the incoming request against the metrics v2 endpoint. The failure we are observing:
, is occurring while attempting to deserialize the incoming request, which we expect to be a gRPC frame. The part I checked the proto file Vector is using (https://github.com/vectordotdev/vector/blob/master/proto/ddsketch_full.proto) , against where it was sourced (https://github.com/DataDog/sketches-go/blob/0a92170/ddsketch/pb/ddsketch.proto) , and that all looks good. So, I'm left to wonder if the incoming data is correctly structured. |
The data sent by the Datadog exporter (and the Datadog Agent) to the I still don't understand from the original report at open-telemetry/opentelemetry-collector-contrib#17373 (comment) why this would only happen with the new feature gate, given the code for sketches has been left unchanged, but it makes sense to me that this would fail since Vector is trying to decode a different kind of payload from the one we send. |
Hmmm ... Vector is receiving the request on the endpoint We do support the Is it possible that the exporter is sending a payload for the |
My bad, I assumed you were talking about the other endpoint based on the Re-reading OP's example they send a statsd count that will result in a Datadog count, so it makes sense a payload is sent to Comparing the two schemas and re-reading our code, one difference is the I also noticed that the error here talks about sketches while decoding an @neuronull does this make sense to you as a possible explanation of the error? Would you mind trying to reproduce with one of the example on our docs to see if you get the same error? |
Ah... I definitely see where that error message is misleading, now that you point it out. I suspect it was copy-pasted and not updated. I took a look at those submission examples you pointed to. I do agree that the What seems to be happening here, at least from what I can tell, is that Vector is only capable of receiving protobuf encoded data on the Those links to the Datadog submission examples, are sending JSON.
That's because the HTTP body is text and not protobuf encoded, and that tracks with code inspection. The origin of the support for the v2 metrics endpoint is this PR: #13028 , and it is not clear from that PR, whether there are any plans to support JSON formatted inputs. I also searched open issues in the Vector repo and found nothing related to this. Generally the use case has been It seems this use case is attempting to make Vector a "drop in" replacement for the Datadog Agent in this pipeline: What I'm suspecting is that the Datadog Agent outputs protobuf encoded payloads to the metrics v2 endpoint, and that Vector's I don't yet understand if this is a requirement for Vector to have that functionality. Also noting that we don't have robust testing on the v2 metrics ingestion (#15108) / cc @jszwedko |
The protobuf explanation makes sense to me, I think that explains this. Based on this function it looks like the Agent uses protobuf when sending to the v2 API endpoint. Unfortunately, AFAICT the official Datadog API client only supports sending metrics as JSON ( |
Thanks for confirming that about the Agent using protobuf. I did confirm with others on the Vector team that my suspicion about the design of the There are a few possibilities that we could do in Vector to address this. We will raise that and discuss internally. |
To clarify: |
Small update: we discussed this and believe the best approach to support this use-case is to have the
Option 3 seemed the best to us since we wanted to add this support anyway. Curious to hear any additional feedback though. |
A note for the community
Problem
We're collecting metrics with the opentelemetry-collector and sending them to vector using Datadog's submission protocol via the datadogexporter
The datadogexporter was recently (v0.69.0) upgraded to use native Datadog client libraries open-telemetry/opentelemetry-collector-contrib#16776
This results in vector rejecting the export requests with 422 Unprocessable Entity
Configuration
Version
vector 0.27.0 (x86_64-unknown-linux-gnu 5623d1e 2023-01-18)
Debug Output
Additional Context
support for OTLP ingest of metrics would also be very much appreciated
References
open-telemetry/opentelemetry-collector-contrib#17373 (comment)
The text was updated successfully, but these errors were encountered: