-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[receiver/datadogreceiver] add json handling for the api/v2/series endpoint #36218
Merged
MovieStoreGuy
merged 4 commits into
open-telemetry:main
from
jdgeisler:opentelemetry-36079
Nov 11, 2024
Merged
[receiver/datadogreceiver] add json handling for the api/v2/series endpoint #36218
MovieStoreGuy
merged 4 commits into
open-telemetry:main
from
jdgeisler:opentelemetry-36079
Nov 11, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jdgeisler
requested review from
jpkrohling,
MovieStoreGuy and
a team
as code owners
November 5, 2024 20:17
MovieStoreGuy
approved these changes
Nov 11, 2024
pull bot
pushed a commit
to abaguas/opentelemetry-collector-contrib
that referenced
this pull request
Nov 12, 2024
…dpoint (open-telemetry#36218) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Adding json handling for the `api/v2/series` endpoint. The datadog api client libraries use json messages, however only protobuf messages are currently supported in the` api/v2/series` endpoint, so requests fail with `proto: illegal wireType 6` If `Content-Type: application/json` is set, then we handle the json message. Otherwise, we handle the protobuf message. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#36079 <!--Describe what testing was performed and which tests were added.--> #### Testing Added test with a json metric payload that now passes. Additionally, I also tested these changes in my own image and confirmed that the datadog api client libraries can now successfully ship metrics to the `api/v2/series` endpoint. I also confirmed with the following curl: ``` curl -X POST \ -H "Content-Type: application/json" \ -H "DD-API-KEY: your_api_key_here" \ -d '{ "series": [ { "resources": [ { "name": "dummyhost", "type": "host" } ], "tags": ["env:test"], "metric": "test.metric", "points": [ { "timestamp": 1730829575, "value": 1.0 } ], "type": 3 } ] }' \ https://datadog-receiver/api/v2/series {"errors":[]} ``` --------- Co-authored-by: Sean Marciniak <[email protected]>
sbylica-splunk
pushed a commit
to sbylica-splunk/opentelemetry-collector-contrib
that referenced
this pull request
Dec 17, 2024
…dpoint (open-telemetry#36218) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Adding json handling for the `api/v2/series` endpoint. The datadog api client libraries use json messages, however only protobuf messages are currently supported in the` api/v2/series` endpoint, so requests fail with `proto: illegal wireType 6` If `Content-Type: application/json` is set, then we handle the json message. Otherwise, we handle the protobuf message. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#36079 <!--Describe what testing was performed and which tests were added.--> #### Testing Added test with a json metric payload that now passes. Additionally, I also tested these changes in my own image and confirmed that the datadog api client libraries can now successfully ship metrics to the `api/v2/series` endpoint. I also confirmed with the following curl: ``` curl -X POST \ -H "Content-Type: application/json" \ -H "DD-API-KEY: your_api_key_here" \ -d '{ "series": [ { "resources": [ { "name": "dummyhost", "type": "host" } ], "tags": ["env:test"], "metric": "test.metric", "points": [ { "timestamp": 1730829575, "value": 1.0 } ], "type": 3 } ] }' \ https://datadog-receiver/api/v2/series {"errors":[]} ``` --------- Co-authored-by: Sean Marciniak <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adding json handling for the
api/v2/series
endpoint. The datadog api client libraries use json messages, however only protobuf messages are currently supported in theapi/v2/series
endpoint, so requests fail withproto: illegal wireType 6
If
Content-Type: application/json
is set, then we handle the json message. Otherwise, we handle the protobuf message.Link to tracking issue
Fixes #36079
Testing
Added test with a json metric payload that now passes.
Additionally, I also tested these changes in my own image and confirmed that the datadog api client libraries can now successfully ship metrics to the
api/v2/series
endpoint.I also confirmed with the following curl: