Skip to content

Report gRPC status code in client-computed stats#10805

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits intomasterfrom
bdu/report-grpc-status-code-to-tracer-client-computed-stats
Mar 13, 2026
Merged

Report gRPC status code in client-computed stats#10805
gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits intomasterfrom
bdu/report-grpc-status-code-to-tracer-client-computed-stats

Conversation

@bric3
Copy link
Contributor

@bric3 bric3 commented Mar 11, 2026

What Does This Do

Reports the gRPC status code via Client Computed Stats.

This status is supported since 7.65.0 in the agent (DataDog/datadog-agent#34220), which is the minimal version needed to support CCS as well.

Current grpc instrumentations capture the status code, but not its numeric value, so it was chosen to add a new span tag that will be used in the client aggregation.

    span.setTag("status.code", status.getCode().name());
    span.setTag("grpc.status.code", status.getCode().name());
+   span.setTag("rpc.grpc.status_code", status.getCode().value());

This affects grpc and armeria instrumentations.

Note an additional system will be added DataDog/system-tests#6483

Motivation

Completeness of CCS.

Additional notes

When client-computed stats (CCS) are enabled, the agent merges stats it computes itself from raw spans with stats pre-computed by the tracer.

For gRPC spans, without Client Computed Stats (metrics) the agent resolves the status code from the span's tags via getGRPCStatusCode(), which always returns a numeric string (e.g. 4) or an empty string. With CCS enabled, the code uses GRPCStatusCode without translation.

flowchart TB
      subgraph tracer["dd-trace-java"]
          span["gRPC span<br>grpc.status.code = 'DEADLINE_EXCEEDED'<br>rpc.grpc.status_code = 4"]

          span -->|raw spans| v04["POST /v0.4/traces<br>msgpack"]
          span --> agg["ConflatingMetricsAggregator<br>reads rpc.grpc.status_code<br>GRPCStatusCode = '4'"]
          agg -->|pre-computed stats| v06["POST /v0.6/stats<br>msgpack · GRPCStatusCode: '4'"]
      end

      subgraph agent["datadog-agent"]
          v04 --> agentPath["NewAggregationFromSpan<br>getGRPCStatusCode<br>meta[grpc.status.code]='DEADLINE_EXCEEDED' → '4'"]
          v06 --> ccsPath["NewAggregationFromGroup<br>GRPCStatusCode → '4'"]

          agentPath --> k1["key{GRPCStatusCode:'4',...}"]
          ccsPath   --> k2["key{GRPCStatusCode:'4',...}"]
      end
Loading

This change mimics the aggregation of the agent, and what is expected from the agent, in NewAggregationFromGroup.

Protocol wise ClientGroupedStats.GRPC_status_code is a string.

@bric3 bric3 added type: bug Bug report and fix comp: metrics Metrics labels Mar 11, 2026
@bric3 bric3 requested a review from amarziali March 11, 2026 13:30
@bric3 bric3 force-pushed the bdu/report-grpc-status-code-to-tracer-client-computed-stats branch from 9ca27a6 to b39ed92 Compare March 11, 2026 13:41
@pr-commenter
Copy link

pr-commenter bot commented Mar 11, 2026

Benchmarks

⚠️ Warning: Baseline build not found for merge-base commit. Comparing against the latest commit on master instead.

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bdu/report-grpc-status-code-to-tracer-client-computed-stats
git_commit_date 1773414187 1773422781
git_commit_sha 7cff994 c7b581d
release_version 1.61.0-SNAPSHOT~7cff99444b 1.61.0-SNAPSHOT~c7b581dd08
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1773424703 1773424703
ci_job_id 1505232526 1505232526
ci_pipeline_id 102434582 102434582
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-gebpzhbr 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-gebpzhbr 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

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

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~c7b581dd08, baseline=1.61.0-SNAPSHOT~7cff99444b

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.059 s) : 0, 1058921
Total [baseline] (8.897 s) : 0, 8897195
Agent [candidate] (1.064 s) : 0, 1064257
Total [candidate] (8.879 s) : 0, 8878941
section iast
Agent [baseline] (1.226 s) : 0, 1226066
Total [baseline] (9.56 s) : 0, 9560060
Agent [candidate] (1.224 s) : 0, 1223811
Total [candidate] (9.652 s) : 0, 9652123
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.059 s -
Agent iast 1.226 s 167.145 ms (15.8%)
Total tracing 8.897 s -
Total iast 9.56 s 662.865 ms (7.5%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.064 s -
Agent iast 1.224 s 159.554 ms (15.0%)
Total tracing 8.879 s -
Total iast 9.652 s 773.182 ms (8.7%)
gantt
    title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~c7b581dd08, baseline=1.61.0-SNAPSHOT~7cff99444b

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.211 ms) : 0, 1211
crashtracking [candidate] (1.209 ms) : 0, 1209
BytebuddyAgent [baseline] (626.943 ms) : 0, 626943
BytebuddyAgent [candidate] (631.714 ms) : 0, 631714
AgentMeter [baseline] (29.015 ms) : 0, 29015
AgentMeter [candidate] (29.4 ms) : 0, 29400
GlobalTracer [baseline] (256.756 ms) : 0, 256756
GlobalTracer [candidate] (258.464 ms) : 0, 258464
AppSec [baseline] (31.478 ms) : 0, 31478
AppSec [candidate] (31.763 ms) : 0, 31763
Debugger [baseline] (58.555 ms) : 0, 58555
Debugger [candidate] (59.004 ms) : 0, 59004
Remote Config [baseline] (615.073 µs) : 0, 615
Remote Config [candidate] (625.727 µs) : 0, 626
Telemetry [baseline] (8.651 ms) : 0, 8651
Telemetry [candidate] (8.692 ms) : 0, 8692
Flare Poller [baseline] (9.53 ms) : 0, 9530
Flare Poller [candidate] (7.224 ms) : 0, 7224
section iast
crashtracking [baseline] (1.197 ms) : 0, 1197
crashtracking [candidate] (1.192 ms) : 0, 1192
BytebuddyAgent [baseline] (795.527 ms) : 0, 795527
BytebuddyAgent [candidate] (793.893 ms) : 0, 793893
AgentMeter [baseline] (11.351 ms) : 0, 11351
AgentMeter [candidate] (11.298 ms) : 0, 11298
GlobalTracer [baseline] (247.229 ms) : 0, 247229
GlobalTracer [candidate] (247.26 ms) : 0, 247260
AppSec [baseline] (26.397 ms) : 0, 26397
AppSec [candidate] (26.316 ms) : 0, 26316
Debugger [baseline] (62.971 ms) : 0, 62971
Debugger [candidate] (62.385 ms) : 0, 62385
Remote Config [baseline] (513.386 µs) : 0, 513
Remote Config [candidate] (519.449 µs) : 0, 519
Telemetry [baseline] (14.783 ms) : 0, 14783
Telemetry [candidate] (14.927 ms) : 0, 14927
Flare Poller [baseline] (4.87 ms) : 0, 4870
Flare Poller [candidate] (4.894 ms) : 0, 4894
IAST [baseline] (25.157 ms) : 0, 25157
IAST [candidate] (25.142 ms) : 0, 25142
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~c7b581dd08, baseline=1.61.0-SNAPSHOT~7cff99444b

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.059 s) : 0, 1058895
Total [baseline] (11.035 s) : 0, 11035082
Agent [candidate] (1.074 s) : 0, 1074038
Total [candidate] (11.117 s) : 0, 11117480
section appsec
Agent [baseline] (1.254 s) : 0, 1253761
Total [baseline] (11.144 s) : 0, 11143896
Agent [candidate] (1.251 s) : 0, 1250784
Total [candidate] (11.159 s) : 0, 11158870
section iast
Agent [baseline] (1.227 s) : 0, 1227461
Total [baseline] (11.334 s) : 0, 11334347
Agent [candidate] (1.239 s) : 0, 1238961
Total [candidate] (11.447 s) : 0, 11446779
section profiling
Agent [baseline] (1.188 s) : 0, 1187505
Total [baseline] (11.04 s) : 0, 11040279
Agent [candidate] (1.189 s) : 0, 1188884
Total [candidate] (11.037 s) : 0, 11036555
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.059 s -
Agent appsec 1.254 s 194.866 ms (18.4%)
Agent iast 1.227 s 168.566 ms (15.9%)
Agent profiling 1.188 s 128.61 ms (12.1%)
Total tracing 11.035 s -
Total appsec 11.144 s 108.815 ms (1.0%)
Total iast 11.334 s 299.265 ms (2.7%)
Total profiling 11.04 s 5.197 ms (0.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.074 s -
Agent appsec 1.251 s 176.747 ms (16.5%)
Agent iast 1.239 s 164.923 ms (15.4%)
Agent profiling 1.189 s 114.846 ms (10.7%)
Total tracing 11.117 s -
Total appsec 11.159 s 41.39 ms (0.4%)
Total iast 11.447 s 329.299 ms (3.0%)
Total profiling 11.037 s -80.925 ms (-0.7%)
gantt
    title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~c7b581dd08, baseline=1.61.0-SNAPSHOT~7cff99444b

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.218 ms) : 0, 1218
crashtracking [candidate] (1.219 ms) : 0, 1219
BytebuddyAgent [baseline] (627.315 ms) : 0, 627315
BytebuddyAgent [candidate] (637.142 ms) : 0, 637142
AgentMeter [baseline] (29.138 ms) : 0, 29138
AgentMeter [candidate] (29.513 ms) : 0, 29513
GlobalTracer [baseline] (256.978 ms) : 0, 256978
GlobalTracer [candidate] (260.022 ms) : 0, 260022
AppSec [baseline] (31.495 ms) : 0, 31495
AppSec [candidate] (31.98 ms) : 0, 31980
Debugger [baseline] (59.527 ms) : 0, 59527
Debugger [candidate] (60.303 ms) : 0, 60303
Remote Config [baseline] (613.652 µs) : 0, 614
Remote Config [candidate] (629.637 µs) : 0, 630
Telemetry [baseline] (8.652 ms) : 0, 8652
Telemetry [candidate] (8.763 ms) : 0, 8763
Flare Poller [baseline] (8.0 ms) : 0, 8000
Flare Poller [candidate] (8.093 ms) : 0, 8093
section appsec
crashtracking [baseline] (1.224 ms) : 0, 1224
crashtracking [candidate] (1.198 ms) : 0, 1198
BytebuddyAgent [baseline] (662.917 ms) : 0, 662917
BytebuddyAgent [candidate] (660.75 ms) : 0, 660750
AgentMeter [baseline] (12.135 ms) : 0, 12135
AgentMeter [candidate] (12.075 ms) : 0, 12075
GlobalTracer [baseline] (259.569 ms) : 0, 259569
GlobalTracer [candidate] (259.282 ms) : 0, 259282
AppSec [baseline] (177.997 ms) : 0, 177997
AppSec [candidate] (177.734 ms) : 0, 177734
Debugger [baseline] (66.269 ms) : 0, 66269
Debugger [candidate] (66.069 ms) : 0, 66069
Remote Config [baseline] (580.652 µs) : 0, 581
Remote Config [candidate] (569.002 µs) : 0, 569
Telemetry [baseline] (8.961 ms) : 0, 8961
Telemetry [candidate] (9.084 ms) : 0, 9084
Flare Poller [baseline] (3.622 ms) : 0, 3622
Flare Poller [candidate] (3.674 ms) : 0, 3674
IAST [baseline] (24.115 ms) : 0, 24115
IAST [candidate] (24.068 ms) : 0, 24068
section iast
crashtracking [baseline] (1.196 ms) : 0, 1196
crashtracking [candidate] (1.211 ms) : 0, 1211
BytebuddyAgent [baseline] (795.492 ms) : 0, 795492
BytebuddyAgent [candidate] (803.37 ms) : 0, 803370
AgentMeter [baseline] (11.278 ms) : 0, 11278
AgentMeter [candidate] (11.594 ms) : 0, 11594
GlobalTracer [baseline] (247.509 ms) : 0, 247509
GlobalTracer [candidate] (249.601 ms) : 0, 249601
AppSec [baseline] (26.416 ms) : 0, 26416
AppSec [candidate] (26.712 ms) : 0, 26712
Debugger [baseline] (66.047 ms) : 0, 66047
Debugger [candidate] (65.151 ms) : 0, 65151
Remote Config [baseline] (540.992 µs) : 0, 541
Remote Config [candidate] (530.885 µs) : 0, 531
Telemetry [baseline] (13.437 ms) : 0, 13437
Telemetry [candidate] (14.396 ms) : 0, 14396
Flare Poller [baseline] (4.419 ms) : 0, 4419
Flare Poller [candidate] (4.772 ms) : 0, 4772
IAST [baseline] (25.088 ms) : 0, 25088
IAST [candidate] (25.456 ms) : 0, 25456
section profiling
crashtracking [baseline] (1.182 ms) : 0, 1182
crashtracking [candidate] (1.183 ms) : 0, 1183
BytebuddyAgent [baseline] (686.496 ms) : 0, 686496
BytebuddyAgent [candidate] (687.198 ms) : 0, 687198
AgentMeter [baseline] (8.671 ms) : 0, 8671
AgentMeter [candidate] (8.707 ms) : 0, 8707
GlobalTracer [baseline] (216.327 ms) : 0, 216327
GlobalTracer [candidate] (216.519 ms) : 0, 216519
AppSec [baseline] (32.034 ms) : 0, 32034
AppSec [candidate] (32.169 ms) : 0, 32169
Debugger [baseline] (64.704 ms) : 0, 64704
Debugger [candidate] (63.231 ms) : 0, 63231
Remote Config [baseline] (574.926 µs) : 0, 575
Remote Config [candidate] (589.598 µs) : 0, 590
Telemetry [baseline] (8.984 ms) : 0, 8984
Telemetry [candidate] (10.551 ms) : 0, 10551
Flare Poller [baseline] (3.495 ms) : 0, 3495
Flare Poller [candidate] (3.517 ms) : 0, 3517
ProfilingAgent [baseline] (93.979 ms) : 0, 93979
ProfilingAgent [candidate] (94.084 ms) : 0, 94084
Profiling [baseline] (94.556 ms) : 0, 94556
Profiling [candidate] (94.639 ms) : 0, 94639
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bdu/report-grpc-status-code-to-tracer-client-computed-stats
git_commit_date 1773414187 1773422781
git_commit_sha 7cff994 c7b581d
release_version 1.61.0-SNAPSHOT~7cff99444b 1.61.0-SNAPSHOT~c7b581dd08
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1773425187 1773425187
ci_job_id 1505232528 1505232528
ci_pipeline_id 102434582 102434582
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-tyjj969g 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-tyjj969g 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 1 performance improvements and 2 performance regressions! Performance is the same for 17 metrics, 16 unstable metrics.

scenario Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p95 Δ mean throughput candidate mean agg_http_req_duration_p50 candidate mean agg_http_req_duration_p95 candidate mean throughput baseline mean agg_http_req_duration_p50 baseline mean agg_http_req_duration_p95 baseline mean throughput
scenario:load:insecure-bank:iast_GLOBAL:high_load worse
[+185.926µs; +320.860µs] or [+7.034%; +12.139%]
worse
[+255.489µs; +640.981µs] or [+3.343%; +8.388%]
unstable
[-241.308op/s; +42.370op/s] or [-17.936%; +3.149%]
2.897ms 8.090ms 1245.938op/s 2.643ms 7.642ms 1345.406op/s
scenario:load:petclinic:code_origins:high_load better
[-1330.894µs; -568.163µs] or [-7.171%; -3.061%]
unsure
[-1.662ms; -0.352ms] or [-5.610%; -1.190%]
unstable
[-12.512op/s; +36.012op/s] or [-5.036%; +14.495%]
17.610ms 28.611ms 260.188op/s 18.559ms 29.618ms 248.438op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~c7b581dd08, baseline=1.61.0-SNAPSHOT~7cff99444b
    dateFormat X
    axisFormat %s
section baseline
no_agent (17.475 ms) : 17295, 17656
.   : milestone, 17475,
appsec (18.842 ms) : 18651, 19033
.   : milestone, 18842,
code_origins (18.789 ms) : 18605, 18972
.   : milestone, 18789,
iast (18.056 ms) : 17873, 18239
.   : milestone, 18056,
profiling (18.887 ms) : 18698, 19075
.   : milestone, 18887,
tracing (17.743 ms) : 17565, 17922
.   : milestone, 17743,
section candidate
no_agent (18.427 ms) : 18238, 18616
.   : milestone, 18427,
appsec (18.626 ms) : 18436, 18815
.   : milestone, 18626,
code_origins (17.932 ms) : 17755, 18109
.   : milestone, 17932,
iast (18.445 ms) : 18260, 18629
.   : milestone, 18445,
profiling (18.734 ms) : 18548, 18920
.   : milestone, 18734,
tracing (17.799 ms) : 17625, 17974
.   : milestone, 17799,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 17.475 ms [17.295 ms, 17.656 ms] -
appsec 18.842 ms [18.651 ms, 19.033 ms] 1.367 ms (7.8%)
code_origins 18.789 ms [18.605 ms, 18.972 ms] 1.313 ms (7.5%)
iast 18.056 ms [17.873 ms, 18.239 ms] 580.953 µs (3.3%)
profiling 18.887 ms [18.698 ms, 19.075 ms] 1.412 ms (8.1%)
tracing 17.743 ms [17.565 ms, 17.922 ms] 267.951 µs (1.5%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.427 ms [18.238 ms, 18.616 ms] -
appsec 18.626 ms [18.436 ms, 18.815 ms] 198.857 µs (1.1%)
code_origins 17.932 ms [17.755 ms, 18.109 ms] -494.31 µs (-2.7%)
iast 18.445 ms [18.26 ms, 18.629 ms] 17.902 µs (0.1%)
profiling 18.734 ms [18.548 ms, 18.92 ms] 307.244 µs (1.7%)
tracing 17.799 ms [17.625 ms, 17.974 ms] -627.386 µs (-3.4%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~c7b581dd08, baseline=1.61.0-SNAPSHOT~7cff99444b
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.188 ms) : 1177, 1200
.   : milestone, 1188,
iast (3.235 ms) : 3192, 3277
.   : milestone, 3235,
iast_FULL (5.79 ms) : 5733, 5848
.   : milestone, 5790,
iast_GLOBAL (3.406 ms) : 3356, 3456
.   : milestone, 3406,
profiling (2.084 ms) : 2065, 2103
.   : milestone, 2084,
tracing (1.767 ms) : 1752, 1781
.   : milestone, 1767,
section candidate
no_agent (1.177 ms) : 1166, 1188
.   : milestone, 1177,
iast (3.133 ms) : 3091, 3176
.   : milestone, 3133,
iast_FULL (5.875 ms) : 5815, 5935
.   : milestone, 5875,
iast_GLOBAL (3.684 ms) : 3623, 3745
.   : milestone, 3684,
profiling (2.192 ms) : 2171, 2212
.   : milestone, 2192,
tracing (1.783 ms) : 1769, 1798
.   : milestone, 1783,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.188 ms [1.177 ms, 1.2 ms] -
iast 3.235 ms [3.192 ms, 3.277 ms] 2.046 ms (172.2%)
iast_FULL 5.79 ms [5.733 ms, 5.848 ms] 4.602 ms (387.3%)
iast_GLOBAL 3.406 ms [3.356 ms, 3.456 ms] 2.217 ms (186.6%)
profiling 2.084 ms [2.065 ms, 2.103 ms] 895.602 µs (75.4%)
tracing 1.767 ms [1.752 ms, 1.781 ms] 578.284 µs (48.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.177 ms [1.166 ms, 1.188 ms] -
iast 3.133 ms [3.091 ms, 3.176 ms] 1.956 ms (166.2%)
iast_FULL 5.875 ms [5.815 ms, 5.935 ms] 4.698 ms (399.2%)
iast_GLOBAL 3.684 ms [3.623 ms, 3.745 ms] 2.507 ms (213.0%)
profiling 2.192 ms [2.171 ms, 2.212 ms] 1.015 ms (86.2%)
tracing 1.783 ms [1.769 ms, 1.798 ms] 606.33 µs (51.5%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bdu/report-grpc-status-code-to-tracer-client-computed-stats
git_commit_date 1773414187 1773422781
git_commit_sha 7cff994 c7b581d
release_version 1.61.0-SNAPSHOT~7cff99444b 1.61.0-SNAPSHOT~c7b581dd08
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1773424808 1773424808
ci_job_id 1505232530 1505232530
ci_pipeline_id 102434582 102434582
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-knkj9qcm 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-knkj9qcm 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

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

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~c7b581dd08, baseline=1.61.0-SNAPSHOT~7cff99444b
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.993 s) : 14993000, 14993000
.   : milestone, 14993000,
appsec (14.869 s) : 14869000, 14869000
.   : milestone, 14869000,
iast (18.112 s) : 18112000, 18112000
.   : milestone, 18112000,
iast_GLOBAL (17.842 s) : 17842000, 17842000
.   : milestone, 17842000,
profiling (15.028 s) : 15028000, 15028000
.   : milestone, 15028000,
tracing (15.105 s) : 15105000, 15105000
.   : milestone, 15105000,
section candidate
no_agent (14.981 s) : 14981000, 14981000
.   : milestone, 14981000,
appsec (14.914 s) : 14914000, 14914000
.   : milestone, 14914000,
iast (18.014 s) : 18014000, 18014000
.   : milestone, 18014000,
iast_GLOBAL (17.662 s) : 17662000, 17662000
.   : milestone, 17662000,
profiling (14.551 s) : 14551000, 14551000
.   : milestone, 14551000,
tracing (15.049 s) : 15049000, 15049000
.   : milestone, 15049000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.993 s [14.993 s, 14.993 s] -
appsec 14.869 s [14.869 s, 14.869 s] -124.0 ms (-0.8%)
iast 18.112 s [18.112 s, 18.112 s] 3.119 s (20.8%)
iast_GLOBAL 17.842 s [17.842 s, 17.842 s] 2.849 s (19.0%)
profiling 15.028 s [15.028 s, 15.028 s] 35.0 ms (0.2%)
tracing 15.105 s [15.105 s, 15.105 s] 112.0 ms (0.7%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.981 s [14.981 s, 14.981 s] -
appsec 14.914 s [14.914 s, 14.914 s] -67.0 ms (-0.4%)
iast 18.014 s [18.014 s, 18.014 s] 3.033 s (20.2%)
iast_GLOBAL 17.662 s [17.662 s, 17.662 s] 2.681 s (17.9%)
profiling 14.551 s [14.551 s, 14.551 s] -430.0 ms (-2.9%)
tracing 15.049 s [15.049 s, 15.049 s] 68.0 ms (0.5%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~c7b581dd08, baseline=1.61.0-SNAPSHOT~7cff99444b
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.479 ms) : 1468, 1491
.   : milestone, 1479,
appsec (3.801 ms) : 3580, 4022
.   : milestone, 3801,
iast (2.257 ms) : 2188, 2327
.   : milestone, 2257,
iast_GLOBAL (2.307 ms) : 2237, 2377
.   : milestone, 2307,
profiling (2.1 ms) : 2044, 2155
.   : milestone, 2100,
tracing (2.078 ms) : 2023, 2132
.   : milestone, 2078,
section candidate
no_agent (1.477 ms) : 1465, 1489
.   : milestone, 1477,
appsec (3.794 ms) : 3573, 4015
.   : milestone, 3794,
iast (2.265 ms) : 2195, 2334
.   : milestone, 2265,
iast_GLOBAL (2.304 ms) : 2234, 2373
.   : milestone, 2304,
profiling (2.1 ms) : 2044, 2157
.   : milestone, 2100,
tracing (2.069 ms) : 2015, 2123
.   : milestone, 2069,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.479 ms [1.468 ms, 1.491 ms] -
appsec 3.801 ms [3.58 ms, 4.022 ms] 2.322 ms (157.0%)
iast 2.257 ms [2.188 ms, 2.327 ms] 778.031 µs (52.6%)
iast_GLOBAL 2.307 ms [2.237 ms, 2.377 ms] 827.514 µs (55.9%)
profiling 2.1 ms [2.044 ms, 2.155 ms] 620.709 µs (42.0%)
tracing 2.078 ms [2.023 ms, 2.132 ms] 598.392 µs (40.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.477 ms [1.465 ms, 1.489 ms] -
appsec 3.794 ms [3.573 ms, 4.015 ms] 2.317 ms (156.9%)
iast 2.265 ms [2.195 ms, 2.334 ms] 787.923 µs (53.3%)
iast_GLOBAL 2.304 ms [2.234 ms, 2.373 ms] 826.883 µs (56.0%)
profiling 2.1 ms [2.044 ms, 2.157 ms] 623.276 µs (42.2%)
tracing 2.069 ms [2.015 ms, 2.123 ms] 592.486 µs (40.1%)

@bric3 bric3 added inst: grpc gRPC instrumentation inst: armeria Armeria Instrumentation labels Mar 11, 2026
@bric3 bric3 changed the title Reports gRPC status code in CCS Report gRPC status code in client-computed stats Mar 11, 2026
@bric3 bric3 force-pushed the bdu/report-grpc-status-code-to-tracer-client-computed-stats branch from 21ec5e9 to 9f3f544 Compare March 12, 2026 09:52
bric3 added 2 commits March 12, 2026 11:02
# Conflicts:
#	dd-trace-core/src/main/java/datadog/trace/common/metrics/MetricKey.java
When client-computed stats (CCS) are enabled, the agent **merges** stats
it computes itself from raw spans with stats pre-computed by the tracer.

For gRPC spans, without Client Computed Stats (metrics) the agent
resolves the status code from the span's tags via
[`getGRPCStatusCode()`](https://github.com/DataDog/datadog-agent/blob/47938ea8c9b9894dcb03dc3f81cf2c6e408f1b6c/pkg/trace/stats/aggregation.go#L167-L221),

which always returns a numeric string (e.g. `4`) or an empty string.
With CCS enabled, the code uses [`GRPCStatusCode`](https://github.com/DataDog/datadog-agent/blob/47938ea8c9b9894dcb03dc3f81cf2c6e408f1b6c/pkg/trace/stats/aggregation.go#L160)
without translation.

This change mimics the aggregation of the agent, and what is expected
from the agent, in [`NewAggregationFromGroup`](https://github.com/DataDog/datadog-agent/blob/47938ea8c9b9894dcb03dc3f81cf2c6e408f1b6c/pkg/trace/stats/aggregation.go#L146-L165).

Protocol wise
[ClientGroupedStats.GRPC_status_code](https://github.com/DataDog/datadog-agent/blob/47938ea8c9b9894dcb03dc3f81cf2c6e408f1b6c/pkg/proto/datadog/trace/stats.proto#L103)
is a `string`.
@bric3 bric3 force-pushed the bdu/report-grpc-status-code-to-tracer-client-computed-stats branch from 9f3f544 to a3832a0 Compare March 12, 2026 10:04
@bric3 bric3 marked this pull request as ready for review March 12, 2026 15:51
@bric3 bric3 requested review from a team as code owners March 12, 2026 15:51
@bric3 bric3 requested a review from PerfectSlayer March 12, 2026 15:51
Copy link
Contributor

@amarziali amarziali left a comment

Choose a reason for hiding this comment

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

Thanks for having fixed that. it looks good. I left a minor comment

@bric3 bric3 requested a review from a team as a code owner March 12, 2026 16:31
@bric3 bric3 requested review from mcculls and removed request for a team March 12, 2026 16:31
@bric3 bric3 force-pushed the bdu/report-grpc-status-code-to-tracer-client-computed-stats branch from b0bf34a to 07ec949 Compare March 12, 2026 16:36
@bric3
Copy link
Contributor Author

bric3 commented Mar 12, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Mar 12, 2026

View all feedbacks in Devflow UI.

2026-03-12 16:37:23 UTC ℹ️ Start processing command /merge


2026-03-12 16:37:30 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
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.


2026-03-12 21:34:16 UTC ⚠️ MergeQueue: This merge request was unqueued

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

@bric3
Copy link
Contributor Author

bric3 commented Mar 13, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Mar 13, 2026

View all feedbacks in Devflow UI.

2026-03-13 13:19:14 UTC ℹ️ Start processing command /merge


2026-03-13 13:19:18 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-03-13 14:00:21 UTCMergeQueue: This merge request is not mergeable, blocked by github

PR can't be merged according to github policy

@bric3
Copy link
Contributor Author

bric3 commented Mar 13, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Mar 13, 2026

View all feedbacks in Devflow UI.

2026-03-13 17:03:02 UTC ℹ️ Start processing command /merge


2026-03-13 17:03:09 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
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.


2026-03-13 18:54:08 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-03-13 19:50:36 UTC ℹ️ MergeQueue: This merge request was merged

@bric3 bric3 added comp: core Tracer core and removed comp: core Tracer core labels Mar 13, 2026
@bric3 bric3 added comp: metrics Metrics and removed comp: metrics Metrics labels Mar 13, 2026
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot merged commit 76fb55f into master Mar 13, 2026
579 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot deleted the bdu/report-grpc-status-code-to-tracer-client-computed-stats branch March 13, 2026 19:50
@github-actions github-actions bot added this to the 1.61.0 milestone Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: metrics Metrics inst: armeria Armeria Instrumentation inst: grpc gRPC instrumentation type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants