Skip to content

chore: implement otel process ctx update#1640

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 13 commits intomainfrom
yannham/process-context-update
Mar 4, 2026
Merged

chore: implement otel process ctx update#1640
gh-worker-dd-mergequeue-cf854d[bot] merged 13 commits intomainfrom
yannham/process-context-update

Conversation

@yannham
Copy link
Contributor

@yannham yannham commented Mar 2, 2026

What does this PR do?

This PR implements the missing update sequence of the OTel process context. This allows for modification of an already published OTel process context.

Motivation

This PR is a planned follow-up of #1585, which was knowingly incomplete: it could publish a fresh context, but wouldn't be able to update the context. This PR implements the missing update functionality. See the OTEP spec mentioned above for more information about the general motivation.

Additional Notes

This only part of #1585 follow-ups. In particular, it does not handle forks (where we should publish a new context instead of updating it if there's been a fork since last publication), which is left for a follow-up.

How to test the change?

This PR includes a test for the update sequence. It could also be hooked up in workflow where any reader implementation of the OTEP spec could try to read a published/updated context.

@yannham yannham requested a review from a team as a code owner March 2, 2026 16:58
@yannham yannham requested review from mabdinur and removed request for a team March 2, 2026 16:58
@yannham yannham force-pushed the yannham/process-context-update branch from d47aa19 to 9f7f1ff Compare March 2, 2026 16:59
@yannham yannham requested review from a team and ivoanjo March 2, 2026 16:59
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/yannham/process-context-update

Summary by Rule

Rule Base Branch PR Branch Change

Annotation Counts by File

File Base Branch PR Branch Change

Annotation Stats by Crate

Crate Base Branch PR Branch Change
clippy-annotation-reporter 5 5 No change (0%)
datadog-ffe-ffi 1 1 No change (0%)
datadog-ipc 27 27 No change (0%)
datadog-live-debugger 6 6 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-remote-config 3 3 No change (0%)
datadog-sidecar 59 59 No change (0%)
libdd-common 10 10 No change (0%)
libdd-common-ffi 12 12 No change (0%)
libdd-crashtracker 12 12 No change (0%)
libdd-data-pipeline 5 5 No change (0%)
libdd-ddsketch 2 2 No change (0%)
libdd-dogstatsd-client 1 1 No change (0%)
libdd-profiling 13 13 No change (0%)
libdd-telemetry 19 19 No change (0%)
libdd-tinybytes 4 4 No change (0%)
libdd-trace-normalization 2 2 No change (0%)
libdd-trace-obfuscation 9 9 No change (0%)
libdd-trace-utils 15 15 No change (0%)
Total 219 219 No change (0%)

About This Report

This report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality.

@yannham yannham changed the title feat: implement otel process ctx update chore: implement otel process ctx update Mar 2, 2026
@pr-commenter
Copy link

pr-commenter bot commented Mar 2, 2026

Benchmarks

Comparison

Benchmark execution time: 2026-03-04 14:46:01

Comparing candidate commit 1b08e39 in PR branch yannham/process-context-update with baseline commit 085bdda in branch main.

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

scenario:credit_card/is_card_number/ 378282246310005

  • 🟥 execution_time [+10.814µs; +10.993µs] or [+14.857%; +15.102%]
  • 🟥 throughput [-1803265.366op/s; -1775665.517op/s] or [-13.126%; -12.925%]

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
redis/obfuscate_redis_string execution_time 32.703µs 33.447µs ± 1.365µs 32.844µs ± 0.058µs 32.895µs 36.400µs 36.454µs 36.901µs 12.35% 1.705 0.930 4.07% 0.097µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [33.258µs; 33.636µs] or [-0.566%; +0.566%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_trace/test_trace execution_time 242.033ns 251.198ns ± 13.305ns 243.676ns ± 1.334ns 253.148ns 281.106ns 283.374ns 284.833ns 16.89% 1.409 0.391 5.28% 0.941ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_trace/test_trace execution_time [249.354ns; 253.042ns] or [-0.734%; +0.734%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching serializing traces from their internal representation to msgpack execution_time 13.977ms 14.025ms ± 0.028ms 14.020ms ± 0.011ms 14.032ms 14.072ms 14.144ms 14.182ms 1.15% 2.604 9.193 0.20% 0.002ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching serializing traces from their internal representation to msgpack execution_time [14.021ms; 14.029ms] or [-0.028%; +0.028%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
concentrator/add_spans_to_concentrator execution_time 10.650ms 10.677ms ± 0.013ms 10.675ms ± 0.007ms 10.685ms 10.700ms 10.715ms 10.763ms 0.82% 1.733 7.447 0.13% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
concentrator/add_spans_to_concentrator execution_time [10.675ms; 10.679ms] or [-0.017%; +0.017%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time 533.956µs 534.877µs ± 0.724µs 534.769µs ± 0.278µs 535.067µs 535.537µs 538.236µs 539.875µs 0.95% 3.454 16.443 0.13% 0.051µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1852281.024op/s 1869591.964op/s ± 2518.434op/s 1869966.593op/s ± 973.649op/s 1870869.763op/s 1871948.772op/s 1872628.081op/s 1872813.284op/s 0.15% -3.428 16.220 0.13% 178.080op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 380.492µs 381.438µs ± 0.917µs 381.338µs ± 0.229µs 381.573µs 381.990µs 383.023µs 390.166µs 2.32% 7.737 68.381 0.24% 0.065µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2563009.928op/s 2621673.117op/s ± 6187.646op/s 2622345.980op/s ± 1575.215op/s 2623912.485op/s 2625858.797op/s 2626833.009op/s 2628176.752op/s 0.22% -7.661 67.444 0.24% 437.533op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 190.161µs 190.476µs ± 0.154µs 190.470µs ± 0.104µs 190.565µs 190.766µs 190.873µs 191.180µs 0.37% 0.827 1.644 0.08% 0.011µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5230682.486op/s 5250019.764op/s ± 4250.051op/s 5250175.225op/s ± 2877.129op/s 5253153.332op/s 5256101.773op/s 5257843.556op/s 5258705.382op/s 0.16% -0.819 1.618 0.08% 300.524op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 37.375µs 37.537µs ± 0.064µs 37.536µs ± 0.045µs 37.576µs 37.655µs 37.690µs 37.703µs 0.44% 0.187 -0.161 0.17% 0.005µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26523414.965op/s 26640281.296op/s ± 45528.431op/s 26640806.056op/s ± 31969.947op/s 26672970.804op/s 26710454.004op/s 26730710.487op/s 26755976.417op/s 0.43% -0.177 -0.166 0.17% 3219.346op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 45.792µs 45.932µs ± 0.136µs 45.922µs ± 0.033µs 45.956µs 46.018µs 46.080µs 47.643µs 3.75% 10.182 124.431 0.30% 0.010µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 20989608.744op/s 21771377.845op/s ± 62533.945op/s 21775886.448op/s ± 15848.558op/s 21791812.404op/s 21815689.806op/s 21832690.587op/s 21837753.740op/s 0.28% -9.981 120.967 0.29% 4421.818op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time [534.777µs; 534.977µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1869242.933op/s; 1869940.994op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [381.311µs; 381.565µs] or [-0.033%; +0.033%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2620815.568op/s; 2622530.665op/s] or [-0.033%; +0.033%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [190.454µs; 190.497µs] or [-0.011%; +0.011%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5249430.748op/s; 5250608.781op/s] or [-0.011%; +0.011%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [37.528µs; 37.546µs] or [-0.024%; +0.024%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26633971.493op/s; 26646591.099op/s] or [-0.024%; +0.024%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [45.913µs; 45.951µs] or [-0.041%; +0.041%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21762711.242op/s; 21780044.448op/s] or [-0.040%; +0.040%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
receiver_entry_point/report/2597 execution_time 3.152ms 3.182ms ± 0.017ms 3.178ms ± 0.009ms 3.188ms 3.219ms 3.233ms 3.261ms 2.61% 1.354 2.431 0.55% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
receiver_entry_point/report/2597 execution_time [3.180ms; 3.185ms] or [-0.076%; +0.076%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching string interning on wordpress profile execution_time 160.638µs 161.813µs ± 0.347µs 161.809µs ± 0.156µs 161.953µs 162.211µs 162.860µs 164.649µs 1.76% 2.766 22.539 0.21% 0.025µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [161.765µs; 161.861µs] or [-0.030%; +0.030%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample2_frames_x1000 execution_time 726.149µs 727.607µs ± 0.683µs 727.515µs ± 0.409µs 727.990µs 728.626µs 729.518µs 731.585µs 0.56% 1.412 5.526 0.09% 0.048µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample2_frames_x1000 execution_time [727.513µs; 727.702µs] or [-0.013%; +0.013%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sql/obfuscate_sql_string execution_time 90.186µs 90.483µs ± 0.219µs 90.411µs ± 0.120µs 90.625µs 90.849µs 90.985µs 91.912µs 1.66% 1.833 7.713 0.24% 0.015µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [90.453µs; 90.513µs] or [-0.033%; +0.033%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
credit_card/is_card_number/ execution_time 3.890µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.913µs 3.916µs 3.918µs 3.921µs 0.24% -1.783 13.468 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 255017598.408op/s 255637582.214op/s ± 192376.924op/s 255631605.765op/s ± 103809.832op/s 255734594.498op/s 255915630.724op/s 255974911.688op/s 257053722.016op/s 0.56% 1.811 13.692 0.08% 13603.103op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 78.884µs 79.702µs ± 0.380µs 79.655µs ± 0.279µs 79.990µs 80.385µs 80.635µs 80.924µs 1.59% 0.474 -0.335 0.48% 0.027µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12357216.531op/s 12546999.601op/s ± 59731.737op/s 12554145.444op/s ± 43969.686op/s 12596197.838op/s 12629496.194op/s 12647503.253op/s 12676913.369op/s 0.98% -0.454 -0.366 0.47% 4223.672op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 82.576µs 83.696µs ± 0.566µs 83.654µs ± 0.422µs 84.102µs 84.637µs 85.063µs 85.457µs 2.16% 0.417 -0.183 0.67% 0.040µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 11701724.220op/s 11948591.947op/s ± 80603.431op/s 11953990.287op/s ± 60266.924op/s 12010232.771op/s 12066784.652op/s 12101969.098op/s 12110051.302op/s 1.31% -0.384 -0.229 0.67% 5699.523op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.894µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.917µs 3.919µs 3.921µs 0.21% -0.956 6.530 0.07% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 255065433.864op/s 255601153.611op/s ± 190418.531op/s 255603041.677op/s ± 112429.982op/s 255711164.036op/s 255887684.303op/s 255947424.835op/s 256788416.793op/s 0.46% 0.973 6.635 0.07% 13464.623op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 69.106µs 69.690µs ± 0.359µs 69.637µs ± 0.231µs 69.883µs 70.441µs 70.639µs 70.967µs 1.91% 0.964 0.722 0.51% 0.025µs 1 200
credit_card/is_card_number/378282246310005 throughput 14091019.177op/s 14349566.801op/s ± 73627.695op/s 14360140.735op/s ± 47648.557op/s 14403909.235op/s 14440501.866op/s 14453606.742op/s 14470439.204op/s 0.77% -0.937 0.642 0.51% 5206.264op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 52.142µs 52.224µs ± 0.039µs 52.223µs ± 0.029µs 52.250µs 52.286µs 52.308µs 52.334µs 0.21% 0.169 -0.357 0.07% 0.003µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 19108209.892op/s 19148163.075op/s ± 14116.430op/s 19148614.693op/s ± 10472.089op/s 19159138.348op/s 19170969.401op/s 19176695.119op/s 19178326.573op/s 0.16% -0.166 -0.360 0.07% 998.182op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.028µs 6.039µs ± 0.013µs 6.036µs ± 0.003µs 6.039µs 6.072µs 6.078µs 6.113µs 1.28% 3.176 11.386 0.21% 0.001µs 1 200
credit_card/is_card_number/x371413321323331 throughput 163584604.950op/s 165587732.790op/s ± 347070.561op/s 165682029.178op/s ± 85729.921op/s 165754259.208op/s 165826610.355op/s 165880846.724op/s 165890075.386op/s 0.13% -3.155 11.208 0.21% 24541.595op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.893µs 3.913µs ± 0.003µs 3.913µs ± 0.002µs 3.914µs 3.917µs 3.919µs 3.920µs 0.20% -1.163 8.442 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 255088771.392op/s 255582213.770op/s ± 190738.746op/s 255586707.812op/s ± 118270.934op/s 255698332.412op/s 255824647.875op/s 255961874.503op/s 256848919.154op/s 0.49% 1.184 8.586 0.07% 13487.266op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 64.180µs 64.456µs ± 0.137µs 64.443µs ± 0.089µs 64.540µs 64.710µs 64.781µs 64.827µs 0.60% 0.388 -0.285 0.21% 0.010µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15425607.339op/s 15514432.025op/s ± 32958.459op/s 15517492.754op/s ± 21317.130op/s 15535661.009op/s 15562465.358op/s 15576475.495op/s 15581299.325op/s 0.41% -0.379 -0.295 0.21% 2330.515op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 57.808µs 58.078µs ± 0.191µs 58.025µs ± 0.105µs 58.169µs 58.430µs 58.688µs 58.745µs 1.24% 1.185 1.330 0.33% 0.014µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 17022644.939op/s 17218404.000op/s ± 56428.811op/s 17233946.604op/s ± 31007.308op/s 17261147.315op/s 17286229.101op/s 17294720.354op/s 17298553.841op/s 0.37% -1.166 1.267 0.33% 3990.120op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.895µs 3.913µs ± 0.003µs 3.913µs ± 0.002µs 3.915µs 3.918µs 3.921µs 3.921µs 0.21% -0.644 4.394 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 255016293.206op/s 255541768.420op/s ± 204174.248op/s 255554728.480op/s ± 129530.712op/s 255673838.625op/s 255832468.606op/s 255919191.119op/s 256714319.848op/s 0.45% 0.659 4.471 0.08% 14437.300op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 54.568µs 54.983µs ± 0.284µs 54.942µs ± 0.213µs 55.148µs 55.502µs 55.834µs 55.935µs 1.81% 0.883 0.561 0.52% 0.020µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17877871.154op/s 18187787.228op/s ± 93594.618op/s 18201023.844op/s ± 70764.193op/s 18272794.765op/s 18300323.129op/s 18317203.159op/s 18325736.544op/s 0.69% -0.855 0.483 0.51% 6618.139op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 52.151µs 52.227µs ± 0.040µs 52.223µs ± 0.028µs 52.254µs 52.310µs 52.337µs 52.387µs 0.31% 0.752 0.937 0.08% 0.003µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 19088669.155op/s 19147106.562op/s ± 14833.713op/s 19148618.512op/s ± 10177.624op/s 19158332.065op/s 19168679.148op/s 19171847.678op/s 19175147.092op/s 0.14% -0.746 0.922 0.08% 1048.902op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.028µs 6.036µs ± 0.008µs 6.034µs ± 0.003µs 6.038µs 6.046µs 6.073µs 6.080µs 0.75% 3.512 14.568 0.13% 0.001µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 164480284.019op/s 165668656.490op/s ± 212001.822op/s 165714500.434op/s ± 75012.950op/s 165784194.529op/s 165838351.172op/s 165868120.182op/s 165885854.504op/s 0.10% -3.496 14.455 0.13% 14990.793op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
credit_card/is_card_number/ execution_time [3.911µs; 3.912µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ throughput [255610920.622op/s; 255664243.805op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [79.649µs; 79.755µs] or [-0.066%; +0.066%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12538721.357op/s; 12555277.845op/s] or [-0.066%; +0.066%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [83.617µs; 83.774µs] or [-0.094%; +0.094%] None None None
credit_card/is_card_number/ 378282246310005 throughput [11937421.086op/s; 11959762.807op/s] or [-0.093%; +0.093%] None None None
credit_card/is_card_number/37828224631 execution_time [3.912µs; 3.913µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/37828224631 throughput [255574763.434op/s; 255627543.788op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/378282246310005 execution_time [69.641µs; 69.740µs] or [-0.071%; +0.071%] None None None
credit_card/is_card_number/378282246310005 throughput [14339362.710op/s; 14359770.891op/s] or [-0.071%; +0.071%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [52.219µs; 52.230µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [19146206.674op/s; 19150119.477op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.037µs; 6.041µs] or [-0.029%; +0.029%] None None None
credit_card/is_card_number/x371413321323331 throughput [165539632.148op/s; 165635833.431op/s] or [-0.029%; +0.029%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.912µs; 3.913µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ throughput [255555779.215op/s; 255608648.326op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [64.437µs; 64.475µs] or [-0.029%; +0.029%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15509864.300op/s; 15518999.750op/s] or [-0.029%; +0.029%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [58.052µs; 58.104µs] or [-0.046%; +0.046%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [17210583.510op/s; 17226224.491op/s] or [-0.045%; +0.045%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.913µs; 3.914µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255513471.833op/s; 255570065.007op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [54.944µs; 55.023µs] or [-0.072%; +0.072%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [18174815.914op/s; 18200758.542op/s] or [-0.071%; +0.071%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [52.222µs; 52.233µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [19145050.752op/s; 19149162.372op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.035µs; 6.037µs] or [-0.018%; +0.018%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [165639275.077op/s; 165698037.904op/s] or [-0.018%; +0.018%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
single_flag_killswitch/rules-based execution_time 189.292ns 191.694ns ± 1.925ns 191.543ns ± 1.308ns 192.685ns 195.187ns 197.328ns 201.406ns 5.15% 1.372 3.161 1.00% 0.136ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
single_flag_killswitch/rules-based execution_time [191.427ns; 191.961ns] or [-0.139%; +0.139%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching deserializing traces from msgpack to their internal representation execution_time 48.448ms 48.790ms ± 1.056ms 48.632ms ± 0.088ms 48.773ms 48.915ms 51.416ms 61.639ms 26.75% 10.135 113.355 2.16% 0.075ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching deserializing traces from msgpack to their internal representation execution_time [48.644ms; 48.936ms] or [-0.300%; +0.300%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
ip_address/quantize_peer_ip_address_benchmark execution_time 4.956µs 5.029µs ± 0.049µs 5.012µs ± 0.025µs 5.041µs 5.116µs 5.119µs 5.122µs 2.19% 0.780 -0.773 0.98% 0.003µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
ip_address/quantize_peer_ip_address_benchmark execution_time [5.022µs; 5.036µs] or [-0.136%; +0.136%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
two way interface execution_time 17.792µs 25.749µs ± 9.480µs 18.292µs ± 0.312µs 34.042µs 43.062µs 45.912µs 69.056µs 277.52% 0.949 0.652 36.72% 0.670µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [24.435µs; 27.063µs] or [-5.102%; +5.102%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time 185.374µs 185.920µs ± 0.272µs 185.932µs ± 0.230µs 186.155µs 186.300µs 186.455µs 186.761µs 0.45% 0.038 -0.801 0.15% 0.019µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5354434.804op/s 5378664.828op/s ± 7865.404op/s 5378299.864op/s ± 6651.096op/s 5385005.332op/s 5390947.177op/s 5392366.089op/s 5394502.678op/s 0.30% -0.033 -0.807 0.15% 556.168op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 17.892µs 17.946µs ± 0.028µs 17.944µs ± 0.017µs 17.963µs 17.996µs 18.020µs 18.057µs 0.63% 0.733 0.940 0.16% 0.002µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 55379463.340op/s 55724019.080op/s ± 86562.660op/s 55730278.576op/s ± 54235.690op/s 55783330.981op/s 55852563.701op/s 55878276.608op/s 55890323.459op/s 0.29% -0.722 0.910 0.15% 6120.904op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.270µs 10.386µs ± 0.053µs 10.378µs ± 0.034µs 10.418µs 10.486µs 10.522µs 10.577µs 1.92% 0.660 0.512 0.51% 0.004µs 1 200
normalization/normalize_name/normalize_name/good throughput 94543886.628op/s 96287920.791op/s ± 488368.828op/s 96356624.642op/s ± 313547.430op/s 96637544.238op/s 96992091.671op/s 97140258.056op/s 97375580.565op/s 1.06% -0.629 0.450 0.51% 34532.891op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time [185.882µs; 185.958µs] or [-0.020%; +0.020%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5377574.758op/s; 5379754.897op/s] or [-0.020%; +0.020%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [17.942µs; 17.949µs] or [-0.022%; +0.022%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [55712022.328op/s; 55736015.832op/s] or [-0.022%; +0.022%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.378µs; 10.393µs] or [-0.071%; +0.071%] None None None
normalization/normalize_name/normalize_name/good throughput [96220237.568op/s; 96355604.014op/s] or [-0.070%; +0.070%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sdk_test_data/rules-based execution_time 143.659µs 146.015µs ± 1.905µs 145.765µs ± 0.586µs 146.373µs 147.257µs 152.318µs 165.340µs 13.43% 6.521 57.342 1.30% 0.135µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sdk_test_data/rules-based execution_time [145.751µs; 146.279µs] or [-0.181%; +0.181%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample_frames_x1000 execution_time 4.203ms 4.212ms ± 0.008ms 4.212ms ± 0.003ms 4.215ms 4.217ms 4.220ms 4.309ms 2.30% 8.913 106.725 0.19% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample_frames_x1000 execution_time [4.211ms; 4.213ms] or [-0.026%; +0.026%] None None None

Group 18

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
write only interface execution_time 1.209µs 3.207µs ± 1.421µs 3.003µs ± 0.025µs 3.028µs 3.662µs 13.880µs 14.779µs 392.14% 7.374 55.455 44.19% 0.100µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [3.010µs; 3.404µs] or [-6.140%; +6.140%] None None None

Group 19

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1b08e39 1772634629 yannham/process-context-update
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
tags/replace_trace_tags execution_time 2.363µs 2.410µs ± 0.020µs 2.404µs ± 0.009µs 2.422µs 2.450µs 2.462µs 2.467µs 2.61% 0.818 0.405 0.82% 0.001µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.407µs; 2.412µs] or [-0.114%; +0.114%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

codecov-commenter commented Mar 2, 2026

Codecov Report

❌ Patch coverage is 88.67925% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.24%. Comparing base (085bdda) to head (1b08e39).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1640      +/-   ##
==========================================
+ Coverage   71.19%   71.24%   +0.04%     
==========================================
  Files         425      425              
  Lines       62666    62705      +39     
==========================================
+ Hits        44615    44673      +58     
+ Misses      18051    18032      -19     
Components Coverage Δ
libdd-crashtracker 63.04% <ø> (-0.02%) ⬇️
libdd-crashtracker-ffi 15.63% <ø> (ø)
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 87.38% <ø> (ø)
libdd-data-pipeline-ffi 72.83% <ø> (ø)
libdd-common 79.73% <ø> (ø)
libdd-common-ffi 73.40% <ø> (ø)
libdd-telemetry 62.48% <ø> (ø)
libdd-telemetry-ffi 16.75% <ø> (ø)
libdd-dogstatsd-client 82.64% <ø> (ø)
datadog-ipc 80.74% <ø> (ø)
libdd-profiling 81.60% <ø> (+0.01%) ⬆️
libdd-profiling-ffi 63.65% <ø> (ø)
datadog-sidecar 33.45% <ø> (ø)
datdog-sidecar-ffi 12.41% <ø> (ø)
spawn-worker 54.69% <ø> (ø)
libdd-tinybytes 93.16% <ø> (ø)
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 94.67% <ø> (ø)
libdd-trace-protobuf 68.00% <ø> (ø)
libdd-trace-utils 88.97% <ø> (ø)
datadog-tracer-flare 90.45% <ø> (ø)
libdd-log 74.69% <ø> (ø)
🚀 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.

@dd-octo-sts
Copy link
Contributor

dd-octo-sts bot commented Mar 2, 2026

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 97.30 MB 97.30 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.51 MB 8.51 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.12 MB 11.12 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 112.92 MB 112.92 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 27.16 MB 27.16 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 76.26 KB 76.26 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 185.98 MB 185.96 MB -0% (-16.00 KB) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 916.65 MB 916.65 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 9.93 MB 9.93 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 76.26 KB 76.26 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 24.76 MB 24.76 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 51.43 MB 51.43 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 22.97 MB 22.97 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 77.44 KB 77.44 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 190.13 MB 190.15 MB +0% (+16.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 900.31 MB 900.31 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 7.53 MB 7.53 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 77.44 KB 77.44 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 26.52 MB 26.52 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 47.06 MB 47.06 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 85.27 MB 85.27 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 10.04 MB 10.04 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 105.90 MB 105.90 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.79 MB 11.79 MB 0% (0 B) 👌

@yannham yannham force-pushed the yannham/process-context-update branch 2 times, most recently from 921f74c to 03052b6 Compare March 3, 2026 10:05
@yannham yannham force-pushed the yannham/process-context-update branch from 588ed19 to 28f4c58 Compare March 3, 2026 12:26
@yannham yannham force-pushed the yannham/process-context-update branch from e9fc1af to b6d62d9 Compare March 3, 2026 15:58
@yannham yannham requested a review from a team as a code owner March 3, 2026 15:58
@yannham yannham force-pushed the yannham/process-context-update branch 2 times, most recently from a7df237 to 1a357fc Compare March 3, 2026 16:29
@datadog-datadog-prod-us1-2
Copy link

datadog-datadog-prod-us1-2 bot commented Mar 3, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

@yannham yannham force-pushed the yannham/process-context-update branch from 1a357fc to edaa4df Compare March 3, 2026 17:10
Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

👍 Left a few notes/questions but overall it LGTM, excited for the next parts!

yannham and others added 9 commits March 4, 2026 15:30
Co-authored-by: Björn Antonsson <bjorn.antonsson@datadoghq.com>
Replace the separate `publish_then_read_context` and `update_process_context`
tests with a single `publish_then_update_process_context` test that checks all
header fields (signature, version, payload size, timestamp, payload content)
after the initial publish of `payload_v1`, then again after the update to
`payload_v2`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the hand-rolled `TEST_SERIALIZER: Mutex<()>` with the
`#[serial_test::serial]` attribute applied at the module level, which
is the established pattern already used by other crates in this repo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yannham yannham force-pushed the yannham/process-context-update branch from 4213dd2 to 1b08e39 Compare March 4, 2026 14:30
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot merged commit 36383f2 into main Mar 4, 2026
76 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot deleted the yannham/process-context-update branch March 4, 2026 16:16
gh-worker-dd-mergequeue-cf854d bot pushed a commit that referenced this pull request Mar 5, 2026
Depends #1640

# What does this PR do?

This PR is a follow up of #1585 and #1640 which implement OTel process context publication. It adds a proper handling of the case of publishing a new context after a `fork`.

# Motivation

Some language runtimes (e.g. Python or Ruby) resorts to `fork`. In this case, the OTel process context of the child must be re-published (the process context of the parent is explicitly NOT inherited through `MADVISE_DONTFORK`). However, since they share the same copy of the static handler, prior to this PR, the publication would try to access the non-inherited mapping, potentially causing a crash.

This PR properly handles this case by storing the PID of the publisher, so that upon update, we can detect if there's been a fork since (and we are a child), in which case we can re-create a mapping from scratch.

# How to test the change?

There is currently no test, because having tests that `fork` is not trivial to set up in the current Rust test framework (it is admittedly possible, but is a larger question that should be treated separately IMHO). However, two follow-up PRs are coming with an FFI and libdatadog-side protobuf encoding of the payload, which will make it possible to test the fork behavior e.g. from Ruby, once they land.

Co-authored-by: yann.hamdaoui <yann.hamdaoui@datadoghq.com>
gh-worker-dd-mergequeue-cf854d bot pushed a commit that referenced this pull request Mar 5, 2026
Depends #1650

# What does this PR do?

Follow-up of #1585 #1640 #1650

Adds the protobuf definition for the OTel process context and associated messages, and make the interface of the publisher higher-level by taking the new structured `ProcessContext` value instead of a raw bytes payload.

# Motivation

Since libdatadog is already taking care of some protobuf encoding, and it's supposedly faster and simpler to do here rather than on the side of each language runtime, it makes sense to offer an interface with a struct that is encoded by libdatadog. The process context will be a `ProcessContext`-based opaque pointer on the FFI side, with proper setters/getters.

# Additional Notes

I was not sure where to put the protobuf definition, as there are a bunch of protobuf-dedicated crates in libdatadog. I feel like the OTel process context is about tracing metadata, but I'm happy to move it elsewhere if it makes more sense.

# How to test the change?

Once the FFI lands, we'll be able to publish the context from a language runtime and check the whole process end-to-end. For now, I feel like an additional test would mostly test `prost`, which isn't very valuable.

Co-authored-by: yann.hamdaoui <yann.hamdaoui@datadoghq.com>
gh-worker-dd-mergequeue-cf854d bot pushed a commit that referenced this pull request Mar 5, 2026
# What does this PR do?
[feat: process context publication](#1585)
[ci: pass macos label to downstream project](#1647)
[chore: implement otel process ctx update](#1640)
[chore(crashtracking): emit a best effort stacktrace for Mac](#1645)
[ci: remove depth so it can cause problems when getting the diffs](#1657)
[build(macOS): set the LC_ID_DYLIB for mac binaries to set correct name for linking](#1646)
[chore(ci): fix crashtracker receiver binary rpath setting](#1652)
[chore(deps): bump blazesym to 0.2.3 and blazesym-c to 0.1.7](#1654)
[feat: otel process ctxt protobuf encoding](#1651)
[chore(crashtracker): fix benchmark job](#1664)
# Motivation

What inspired you to submit this pull request?

# Additional Notes

Anything else we should know when reviewing?

# How to test the change?

Describe here in detail how the change can be validated.


Co-authored-by: gyuheon.oh <gyuheon.oh@datadoghq.com>
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.

4 participants