Skip to content
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/datadog] Implement '/stats' endpoint #34790

Merged

Conversation

lopes-felipe
Copy link
Member

Description:
Following up on #34772, this PR implements Datadog Agent's /stats endpoint, which is used for sending client stats of the local sampled spans to calculate the trace metrics.

This PR also does a minor refactor in the usage of Datadog's common headers, moving from literal strings to centralized constants.

Link to tracking Issue:

Testing:

Documentation:

@lopes-felipe lopes-felipe requested a review from a team August 21, 2024 15:20
@github-actions github-actions bot added the cmd/otelcontribcol otelcontribcol command label Aug 21, 2024
@lopes-felipe
Copy link
Member Author

lopes-felipe commented Aug 21, 2024

@jpkrohling, it looks like I'm having the same issues here. I have tried your make lint and make gotidy spells, but no luck. Any other magic words here that could please the CI Lords? 🙂

@jpkrohling
Copy link
Member

I can run those for you, but can you try running make gotidy at the root of the project? It should take a while, but will run it on modules that consume this receiver, like the otelcontribcol. If you are using go 1.23, make sure the toolchain entry doesn't change (I typically need to revert it manually).

@lopes-felipe
Copy link
Member Author

I can run those for you, but can you try running make gotidy at the root of the project? It should take a while, but will run it on modules that consume this receiver, like the otelcontribcol. If you are using go 1.23, make sure the toolchain entry doesn't change (I typically need to revert it manually).

Thanks for the response. Just ran make gotidy at the root, and made no changes. I'm using go 1.22.4.

cmd/otelcontribcol/go.mod Outdated Show resolved Hide resolved
@lopes-felipe lopes-felipe changed the title [receiver/datadogreceiver] Implement '/stats' endpoint [receiver/datadog] Implement '/stats' endpoint Aug 26, 2024
@jpkrohling
Copy link
Member

Sorry about the merge conflict. Would you be able to address it? Once it's done, I'll merge on green.

@lopes-felipe
Copy link
Member Author

Sorry about the merge conflict. Would you be able to address it? Once it's done, I'll merge on green.

No problem! Thanks for the help :)

@jpkrohling jpkrohling merged commit 59151b5 into open-telemetry:main Aug 27, 2024
156 checks passed
@github-actions github-actions bot added this to the next release milestone Aug 27, 2024
@lopes-felipe lopes-felipe deleted the datadog-receiver/stats-endpoint2 branch August 27, 2024 14:06
f7o pushed a commit to f7o/opentelemetry-collector-contrib that referenced this pull request Sep 12, 2024
**Description:** <Describe what has changed.>
Following up on open-telemetry#34772, this PR implements Datadog Agent's `/stats`
endpoint, which is used for sending [client
stats](https://github.com/DataDog/dd-trace-java/blob/master/communication/src/main/java/datadog/communication/ddagent/DDAgentFeaturesDiscovery.java#L40)
of the [local sampled
spans](https://github.com/DataDog/dd-trace-java/blob/master/dd-trace-core/src/main/java/datadog/trace/core/CoreTracer.java#L993-L1008)
to calculate the [trace
metrics](https://docs.datadoghq.com/tracing/metrics/metrics_namespace/).

This PR also does a minor refactor in the usage of Datadog's common
headers, moving from literal strings to centralized constants.

**Link to tracking Issue:** <Issue number if applicable>

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants