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

internal: implement new tag for trace source #3230

Merged
merged 9 commits into from
Feb 28, 2025

Conversation

genesor
Copy link
Member

@genesor genesor commented Feb 25, 2025

What does this PR do?

This PR implements the new RFC that adds support for new tag _dd.p.ts containing the "source" of a trace. This source represents the product that interacted with a trace.

This tag is forwarded to downstream services that will decide wether to keep a trace or not based on their configuration plus the value of this tag.

The representation of this source is 2 character hexadecimal string of the bitmask. (eg: 02 when ASM interacts with a trace)

The RFC also includes the renaming of the env var DD_EXPERIMENTAL_APPSEC_STANDALONE_ENABLED used to disable APM while keeping other product that use traces as their transport active.

✅ System test successful run

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.

@genesor genesor added the appsec label Feb 25, 2025
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Feb 25, 2025

Datadog Report

Branch report: ben.db/APPSEC-56328-asm-standalone-billing-v2
Commit report: 213039e
Test service: dd-trace-go

✅ 0 Failed, 5386 Passed, 72 Skipped, 2m 58.72s Total Time

@pr-commenter
Copy link

pr-commenter bot commented Feb 25, 2025

Benchmarks

Benchmark execution time: 2025-02-28 13:46:47

Comparing candidate commit 176883a in PR branch ben.db/APPSEC-56328-asm-standalone-billing-v2 with baseline commit e378af5 in branch main.

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

@genesor genesor marked this pull request as ready for review February 27, 2025 13:31
@genesor genesor requested review from a team as code owners February 27, 2025 13:31
@@ -81,6 +81,8 @@ jobs:
scenario: APPSEC_LOW_WAF_TIMEOUT
- weblog-variant: net-http
scenario: APPSEC_STANDALONE
- weblog-variant: net-http
scenario: APPSEC_STANDALONE_V2

Choose a reason for hiding this comment

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

Copy link
Member

@kakkoyun kakkoyun left a comment

Choose a reason for hiding this comment

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

LGTM

@genesor
Copy link
Member Author

genesor commented Feb 28, 2025

/merge

@dd-devflow
Copy link

dd-devflow bot commented Feb 28, 2025

View all feedbacks in Devflow UI.
2025-02-28 13:19:52 UTC ℹ️ Start processing command /merge


2025-02-28 13:19:56 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-02-28 17:20:09 UTC ⚠️ MergeQueue: This merge request was unqueued

devflow unqueued this merge request: It did not become mergeable within the expected time

@genesor
Copy link
Member Author

genesor commented Feb 28, 2025

/merge

@dd-devflow
Copy link

dd-devflow bot commented Feb 28, 2025

View all feedbacks in Devflow UI.
2025-02-28 17:22:27 UTC ℹ️ Start processing command /merge


2025-02-28 17:22:34 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-02-28 17:27:17 UTC ℹ️ MergeQueue: This merge request was already merged

This pull request was merged directly.

@genesor genesor merged commit be2813a into main Feb 28, 2025
198 checks passed
@genesor genesor deleted the ben.db/APPSEC-56328-asm-standalone-billing-v2 branch February 28, 2025 17:27
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