Skip to content

Implement stats computation#3756

Merged
bwoebi merged 7 commits intomasterfrom
bob/shm-stats-computation
Apr 15, 2026
Merged

Implement stats computation#3756
bwoebi merged 7 commits intomasterfrom
bob/shm-stats-computation

Conversation

@bwoebi
Copy link
Copy Markdown
Collaborator

@bwoebi bwoebi commented Mar 30, 2026

Uses SHM under the hood, with fallback to sending over the socket (very first payloads when tracer starts, until the sidecar creates the SHM file).

@bwoebi bwoebi requested review from a team as code owners March 30, 2026 15:05
@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 Bot commented Mar 30, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 60.64% (-0.05%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 3f47970 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.79%. Comparing base (fd1ba67) to head (9430a1c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3756      +/-   ##
==========================================
- Coverage   68.85%   68.79%   -0.07%     
==========================================
  Files         166      166              
  Lines       19015    19015              
  Branches     1792     1792              
==========================================
- Hits        13093    13081      -12     
- Misses       5111     5121      +10     
- Partials      811      813       +2     
Flag Coverage Δ
helper-rust-integration 78.82% <ø> (ø)
helper-rust-unit 49.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd1ba67...9430a1c. Read the comment docs.

🚀 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.

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 30, 2026

Benchmarks [ tracer ]

Benchmark execution time: 2026-04-15 02:07:26

Comparing candidate commit 3f47970 in PR branch bob/shm-stats-computation with baseline commit 5017ea1 in branch master.

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

scenario:MessagePackSerializationBench/benchMessagePackSerialization

  • 🟥 execution_time [+3.295µs; +5.225µs] or [+3.151%; +4.996%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache

  • 🟥 execution_time [+6.743µs; +8.837µs] or [+6.804%; +8.916%]

scenario:PDOBench/benchPDOOverhead

  • 🟥 execution_time [+6.004µs; +11.712µs] or [+2.527%; +4.928%]

scenario:PDOBench/benchPDOOverheadWithDBM

  • 🟥 execution_time [+7.972µs; +10.086µs] or [+3.347%; +4.234%]

scenario:SamplingRuleMatchingBench/benchRegexMatching1-opcache

  • 🟥 execution_time [+81.615ns; +147.985ns] or [+5.167%; +9.369%]

scenario:SamplingRuleMatchingBench/benchRegexMatching2-opcache

  • 🟥 execution_time [+89.214ns; +151.186ns] or [+5.674%; +9.615%]

scenario:SamplingRuleMatchingBench/benchRegexMatching3-opcache

  • 🟥 execution_time [+57.977ns; +114.623ns] or [+3.631%; +7.179%]

scenario:SamplingRuleMatchingBench/benchRegexMatching4-opcache

  • 🟥 execution_time [+37.108ns; +133.092ns] or [+2.317%; +8.311%]

scenario:SpanBench/benchDatadogAPI

  • 🟥 execution_time [+1.518µs; +2.791µs] or [+2.352%; +4.326%]

Copy link
Copy Markdown
Contributor

@Leiyks Leiyks left a comment

Choose a reason for hiding this comment

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

looks ok to me 👌

Comment thread ext/span_stats.h
zend_string *type; /* resolved span type */
zend_string *env; /* from span->property_env; NULL when empty */
zend_string *version; /* from span->root->property_version; NULL when empty */
zend_string *span_kind; /* meta["span.kind"], NULL if absent or not a string */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: this is not a owned strings but a borrowed one right ?

Comment thread ext/span_stats.c Outdated
bwoebi added 2 commits April 10, 2026 18:14
Uses SHM under the hood, with fallback to sending over the socket (very first payloads when tracer starts, until the sidecar creates the SHM file).

Signed-off-by: Bob Weinand <[email protected]>

# Conflicts:
#	Cargo.lock
#	components-rs/common.h
#	libdatadog
Signed-off-by: Bob Weinand <[email protected]>
@bwoebi bwoebi force-pushed the bob/shm-stats-computation branch 5 times, most recently from 6452943 to ec35cb3 Compare April 14, 2026 00:56
Signed-off-by: Bob Weinand <[email protected]>
@bwoebi bwoebi force-pushed the bob/shm-stats-computation branch 3 times, most recently from 8a73f82 to cd616d5 Compare April 14, 2026 15:37
@bwoebi bwoebi force-pushed the bob/shm-stats-computation branch from cd616d5 to 8ed24c4 Compare April 14, 2026 16:24
@bwoebi bwoebi requested a review from a team as a code owner April 14, 2026 21:57
@github-actions
Copy link
Copy Markdown
Contributor

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer.
The diff is simplistic, so please check some files anyway while we improve it.

If you need to update snapshots, please refer to CONTRIBUTING.md

2 occurrences of :

- "runtime-id": "19a12c46-a841-41eb-9a2f-013107929bdc"
+ "runtime-id": "19a12c46-a841-41eb-9a2f-013107929bdc"
+ "span.kind": "server"

1 occurrences of :

- "runtime-id": "b32e6f79-c5ef-4d17-bae1-33f912b0a03d"
+ "runtime-id": "b32e6f79-c5ef-4d17-bae1-33f912b0a03d"
+ "span.kind": "server"

1 occurrences of :

- "runtime-id": "d74a50e5-32ec-4668-ad83-9a267ef93418"
+ "runtime-id": "d74a50e5-32ec-4668-ad83-9a267ef93418"
+ "span.kind": "server"

2 occurrences of :

- "runtime-id": "e719c2fb-81c9-4ae3-b1f9-e1a2843d4845"
+ "runtime-id": "e719c2fb-81c9-4ae3-b1f9-e1a2843d4845"
+ "span.kind": "server"

1 occurrences of :

- "runtime-id": "4878b25b-9211-4ac8-8906-d7721b2fa3e5"
+ "runtime-id": "4878b25b-9211-4ac8-8906-d7721b2fa3e5"
+ "span.kind": "server"

1 occurrences of :

- "runtime-id": "5db5654d-5a9e-4cf0-908b-a51f7ced2ff2"
+ "runtime-id": "5db5654d-5a9e-4cf0-908b-a51f7ced2ff2"
+ "span.kind": "server"

1 occurrences of :

- "runtime-id": "143d2b36-2082-43af-b61f-f60b9133ac91"
+ "runtime-id": "143d2b36-2082-43af-b61f-f60b9133ac91"
+ "span.kind": "server"

1 occurrences of :

- "runtime-id": "5c9f7cdc-4833-4e56-a8af-852b6607f988"
+ "runtime-id": "5c9f7cdc-4833-4e56-a8af-852b6607f988"
+ "span.kind": "server"

1 occurrences of :

- "runtime-id": "614cba3e-708f-4797-8da5-40fa71e9c272"
+ "runtime-id": "614cba3e-708f-4797-8da5-40fa71e9c272"
+ "span.kind": "server"

@bwoebi bwoebi force-pushed the bob/shm-stats-computation branch from 0fdd62c to a2465b4 Compare April 14, 2026 22:38
Signed-off-by: Bob Weinand <[email protected]>
@bwoebi bwoebi force-pushed the bob/shm-stats-computation branch from a2465b4 to cd934bd Compare April 14, 2026 23:56
Co-authored-by: Alexandre Rulleau <[email protected]>
@bwoebi bwoebi merged commit 2d33272 into master Apr 15, 2026
2097 of 2099 checks passed
@bwoebi bwoebi deleted the bob/shm-stats-computation branch April 15, 2026 11:22
@github-actions github-actions Bot added this to the 1.19.0 milestone Apr 15, 2026
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