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

feat: implement origin detection #3124

Merged
merged 7 commits into from
Feb 5, 2025

Conversation

darccio
Copy link
Member

@darccio darccio commented Jan 28, 2025

What does this PR do?

Origin Detection is a feature that allows the Agent to correctly detect and tag incoming custom metrics or traces with their Origin (AKA container tags).

Origin Detection works by having the client sending additional data to the Agent so the Agent is able to resolve the Origin.

This PR implements the missing external data implementation. External data was implemented as a last resort for Origin Detection in case no other solution would work.

It also updates the cid- prefix for the container ID according to the current state of Origin Detection as described in the task's RFC.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.
  • For internal contributors, a matching PR should be created to the v2-dev branch and reviewed by @DataDog/apm-go.

Unsure? Have a question? Request a review!

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 28, 2025

Datadog Report

Branch report: dario.castane/langplat-286/origin-detection
Commit report: b6d7792
Test service: dd-trace-go

✅ 0 Failed, 5222 Passed, 73 Skipped, 1m 55.7s Total Time

@pr-commenter
Copy link

pr-commenter bot commented Jan 28, 2025

Benchmarks

Benchmark execution time: 2025-02-05 15:17:35

Comparing candidate commit 2c8524e in PR branch dario.castane/langplat-286/origin-detection with baseline commit 829de1b in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 58 metrics, 1 unstable metrics.

@darccio darccio force-pushed the dario.castane/langplat-286/origin-detection branch from 814d0ba to fa2f8ba Compare January 28, 2025 15:47
@darccio darccio force-pushed the dario.castane/langplat-286/origin-detection branch 2 times, most recently from 4d1fceb to e657fc8 Compare February 3, 2025 15:29
@darccio darccio marked this pull request as ready for review February 3, 2025 15:29
@darccio darccio requested review from a team as code owners February 3, 2025 15:29
@darccio
Copy link
Member Author

darccio commented Feb 3, 2025

system-Tests covering this feature are in progress, but I'm waiting on some help as this feature depends on environment variables and it doesn't seem to be a good way to test these cases in system-tests. Also, the related headers seem to be not properly tested.

@darccio darccio force-pushed the dario.castane/langplat-286/origin-detection branch 2 times, most recently from b2a9fc1 to e657fc8 Compare February 5, 2025 11:18
@darccio darccio enabled auto-merge (squash) February 5, 2025 13:30
Copy link
Contributor

@rarguelloF rarguelloF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@darccio darccio disabled auto-merge February 5, 2025 14:11
@darccio darccio merged commit 739be25 into main Feb 5, 2025
177 checks passed
@darccio darccio deleted the dario.castane/langplat-286/origin-detection branch February 5, 2025 15:36
darccio added a commit that referenced this pull request Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants