Skip to content

Conversation

@tlhunter
Copy link
Member

What does this PR do?

  • modifies behavior to only send process tags in first span of first chunk of a network request

Motivation

  • previous behavior is to send process tags in first span of every chunk of a network request
  • the agent only needs to examine the tags in the first span so this is more efficient

@tlhunter tlhunter added the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label Jan 12, 2026
@github-actions
Copy link

github-actions bot commented Jan 12, 2026

Overall package size

Self size: 4.39 MB
Deduped: 5.21 MB
No deduping: 5.21 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.0 | 68.46 kB | 797.03 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.51%. Comparing base (05e6e69) to head (a23a760).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7224      +/-   ##
==========================================
- Coverage   84.56%   84.51%   -0.06%     
==========================================
  Files         532      530       -2     
  Lines       22651    22622      -29     
==========================================
- Hits        19154    19118      -36     
- Misses       3497     3504       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-datadog-prod-us1

This comment has been minimized.

@pr-commenter
Copy link

pr-commenter bot commented Jan 12, 2026

Benchmarks

Benchmark execution time: 2026-01-13 19:34:12

Comparing candidate commit a23a760 in PR branch tlhunter/process-tags-first-chunk-only with baseline commit 05e6e69 in branch master.

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

@tlhunter tlhunter force-pushed the tlhunter/process-tags-first-chunk-only branch from 637e83a to 26ee8df Compare January 13, 2026 16:48
@tlhunter tlhunter force-pushed the tlhunter/process-tags-first-chunk-only branch from 26ee8df to a23a760 Compare January 13, 2026 19:22
@tlhunter tlhunter marked this pull request as ready for review January 13, 2026 19:50
@tlhunter tlhunter requested a review from a team as a code owner January 13, 2026 19:50
Comment on lines +59 to +62
const shouldAddProcessTags = this._processTags && !trace._processTagsSent
if (shouldAddProcessTags) {
trace._processTagsSent = true
}
Copy link
Member

Choose a reason for hiding this comment

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

if the outgoing request fails to send the first spans, this will stay true and the process tags will never be sent no ?

Copy link
Collaborator

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

Was there anything wrong before? Would it not already have worked due to our isFirstSpanInChunk argument?

The test is actually not very helpful in my opinion due to testing just the direct functionality but not the outcome. So by changing the test to test the outcome instead of internal method calls, we can verify the actual behavior and determine the action better in my opinion.
Please update that no matter if the code needs actual adjustment or not as the current test makes assumptions that we should in my opinion not do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos semver-patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants