Skip to content

Conversation

@mhlidd
Copy link
Contributor

@mhlidd mhlidd commented Oct 14, 2025

What Does This Do

Currently, OTel Spans created from Trace Annotations do not contain the span.kind tag, and spans created from custom instrumentation do not have the type field. This leads to an inconsistent customer experience where spans are missing data on the backend. This PR aims to reduce the inconsistent behavior between these two ways of creating OTel spans.

This PR also adds support to translate span.type tags set in OTel spans to set it as the type field of the Span itself.

Motivation

Escalation

Additional Notes

RFC

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@datadog-official
Copy link

datadog-official bot commented Oct 14, 2025

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 59.70% (+0.01%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7943bc9 | Docs | Was this helpful? Give us feedback!

@mhlidd mhlidd changed the title adding span.kind for Otel trace annotations Normalizing Behavior of OTel Spans Created From Custom Instrumentation and Trace Annotations Oct 14, 2025
@mhlidd mhlidd changed the title Normalizing Behavior of OTel Spans Created From Custom Instrumentation and Trace Annotations Normalizing Behavior of OTel Spans Created From Custom-Instrumentation and Trace Annotations Oct 14, 2025
@mhlidd mhlidd added type: bug Bug report and fix comp: core Tracer core inst: opentelemetry OpenTelemetry instrumentation labels Oct 14, 2025
Comment on lines 103 to 115
private static String convertToSpanType(SpanKind kind) {
if (kind == null) {
return null;
}
switch (kind) {
case SERVER:
return HTTP_SERVER;
case CLIENT:
return HTTP_CLIENT;
case PRODUCER:
return MESSAGE_PRODUCER;
case CONSUMER:
return MESSAGE_CONSUMER;
case INTERNAL:
// checking for SpanKind.INTERNAL, returning DDSpanTypes.INTERNAL
return INTERNAL;
default:
return null;
}
}

private static String convertToSpanKindTag(SpanKind kind) {
if (kind == null) {
return null;
}
switch (kind) {
case CLIENT:
return SPAN_KIND_CLIENT;
case SERVER:
return SPAN_KIND_SERVER;
case PRODUCER:
return SPAN_KIND_PRODUCER;
case CONSUMER:
return SPAN_KIND_CONSUMER;
case INTERNAL:
return SPAN_KIND_INTERNAL;
default:
return null;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is currently duplicated code between the opentelemetry-shim and opentelemetry-annotation modules. @PerfectSlayer what do you think about introducing a new opentelemetry-utils module in utils for shared helpers? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Note that the otel-shim classes are already duplicated at build-time and placed under different packages - i.e. one source, but made available in two places in the final jar. This is to support both OTel drop-in support (which cannot expose the OTel packages on the classpath, so must repackage classes both at build-time and run-time) but also instrument OTel client code in the application.

I would investigate whether the annotations instrumentation can also depend on

  implementation project(':dd-java-agent:agent-otel:otel-shim')

like the main OTel instrumentation under opentelemetry-1.4

Copy link
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

❔ question: ‏My main question for this change is should we change this behavior as it is not part of the spec, or should we evolve the spec and make sure the behavior is consistent across all languages? -- system tests could help here too.

Because I can think of case where customers set span type on purpose and it gets overridden when setting span kind.

public static final String CACHE = "cache";
public static final String SOAP = "soap";

public static final String INTERNAL = "internal";
Copy link
Contributor

Choose a reason for hiding this comment

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

❔ question: ‏It looks like a duplicate of datadog.trace.bootstrap.instrumentation.api.Tags#SPAN_KIND_INTERNAL

* @param kind The OpenTelemetry span kind to convert.
* @return The {@link DDSpanTypes} value.
*/
public static String convertToSpanType(SpanKind kind) {
Copy link
Contributor

Choose a reason for hiding this comment

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

🎯 suggestion: To keep method naming consistent:‏

Suggested change
public static String convertToSpanType(SpanKind kind) {
public static String toSpanType(SpanKind kind) {

Comment on lines 80 to 82
if (kind == null) {
return null;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🎯 suggestion:null is not supposed to be given as parameter as all calls are guarded.
Similarly, I would not have a default case returning null but internal.

@mhlidd
Copy link
Contributor Author

mhlidd commented Oct 15, 2025

❔ question: ‏My main question for this change is should we change this behavior as it is not part of the spec, or should we evolve the spec and make sure the behavior is consistent across all languages? -- system tests could help here too.

Because I can think of case where customers set span type on purpose and it gets overridden when setting span kind.

I think you are right that this change deviates from the spec. There are 2 concepts that are closely tied together, which makes this situation confusing. Below are the changes I think actually should be done:

  1. Datadog has a type field on the Span, which is semantically equivalent to the kind field of an OTel span (or SpanKind). This has the values depicted in this API. We implement this mostly correctly in the tracer (minus adding in the INTERNAL case in a helper).
  2. Datadog also has a span.kind tag that goes in meta. This maps the same SpanKind values to different tag values.

I looked into the OTel implementation of using a SpanBuilder to create an OTel span, and the behavior of setSpanKind in the Datadog shim is different than the OTel implementation. OTel sets the value passed in to the SpanKind field of the Span, while we currently set the span.kind tag instead. I think it makes sense here to align with OTel by modifying the setSpanKind function to set the type field of the span in our shim. This would also make the behavior identical with using OTel trace annotations in Datadog with code such as @WithSpan(kind=""), as we set the type field of the Span there as well.

What do you think @PerfectSlayer? I can see a world where we should keep the legacy behavior of setSpanKind setting the span.kind field to prevent breaking customer code, but I do think there is a need to align the behavior of the function.

@PerfectSlayer
Copy link
Contributor

What do you think @PerfectSlayer? I can see a world where we should keep the legacy behavior of setSpanKind setting the span.kind field to prevent breaking customer code, but I do think there is a need to align the behavior of the function.

No I think it make sens to change to support both span kind and span type on OTel Tracing API and annotation support.

One thing that might be missing is the implementation of the span.type reserved attributes here. Can you add it to? (to call span.setType() on span.type attribute name).

@mhlidd mhlidd force-pushed the mhlidd/add_internal_span_kind branch from aba17be to b46811b Compare October 17, 2025 18:28
@pr-commenter
Copy link

pr-commenter bot commented Oct 17, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/add_internal_span_kind
git_commit_date 1761063603 1761067558
git_commit_sha 60c4f68 7943bc9
release_version 1.55.0-SNAPSHOT~60c4f68423 1.55.0-SNAPSHOT~7943bc960c
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1761069450 1761069450
ci_job_id 1189627516 1189627516
ci_pipeline_id 79866250 79866250
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-jlir6ug2 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-jlir6ug2 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 60 metrics, 5 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~7943bc960c, baseline=1.55.0-SNAPSHOT~60c4f68423

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.02 s) : 0, 1020214
Total [baseline] (8.67 s) : 0, 8670283
Agent [candidate] (1.018 s) : 0, 1017925
Total [candidate] (8.686 s) : 0, 8685596
section iast
Agent [baseline] (1.152 s) : 0, 1152126
Total [baseline] (9.296 s) : 0, 9296100
Agent [candidate] (1.16 s) : 0, 1159544
Total [candidate] (9.318 s) : 0, 9318067
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.02 s -
Agent iast 1.152 s 131.912 ms (12.9%)
Total tracing 8.67 s -
Total iast 9.296 s 625.817 ms (7.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.018 s -
Agent iast 1.16 s 141.619 ms (13.9%)
Total tracing 8.686 s -
Total iast 9.318 s 632.471 ms (7.3%)
gantt
    title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~7943bc960c, baseline=1.55.0-SNAPSHOT~60c4f68423

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.464 ms) : 0, 1464
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (695.565 ms) : 0, 695565
BytebuddyAgent [candidate] (692.641 ms) : 0, 692641
GlobalTracer [baseline] (242.564 ms) : 0, 242564
GlobalTracer [candidate] (243.566 ms) : 0, 243566
AppSec [baseline] (32.309 ms) : 0, 32309
AppSec [candidate] (32.524 ms) : 0, 32524
Debugger [baseline] (6.299 ms) : 0, 6299
Debugger [candidate] (6.334 ms) : 0, 6334
Remote Config [baseline] (689.822 µs) : 0, 690
Remote Config [candidate] (685.602 µs) : 0, 686
Telemetry [baseline] (9.271 ms) : 0, 9271
Telemetry [candidate] (9.347 ms) : 0, 9347
Flare Poller [baseline] (10.884 ms) : 0, 10884
Flare Poller [candidate] (10.26 ms) : 0, 10260
section iast
crashtracking [baseline] (1.473 ms) : 0, 1473
crashtracking [candidate] (1.487 ms) : 0, 1487
BytebuddyAgent [baseline] (815.956 ms) : 0, 815956
BytebuddyAgent [candidate] (820.773 ms) : 0, 820773
GlobalTracer [baseline] (231.644 ms) : 0, 231644
GlobalTracer [candidate] (233.01 ms) : 0, 233010
IAST [baseline] (26.668 ms) : 0, 26668
IAST [candidate] (27.151 ms) : 0, 27151
AppSec [baseline] (35.285 ms) : 0, 35285
AppSec [candidate] (35.444 ms) : 0, 35444
Debugger [baseline] (6.159 ms) : 0, 6159
Debugger [candidate] (6.291 ms) : 0, 6291
Remote Config [baseline] (610.494 µs) : 0, 610
Remote Config [candidate] (631.79 µs) : 0, 632
Telemetry [baseline] (8.755 ms) : 0, 8755
Telemetry [candidate] (8.859 ms) : 0, 8859
Flare Poller [baseline] (4.208 ms) : 0, 4208
Flare Poller [candidate] (4.272 ms) : 0, 4272
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~7943bc960c, baseline=1.55.0-SNAPSHOT~60c4f68423

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.021 s) : 0, 1021274
Total [baseline] (10.656 s) : 0, 10655677
Agent [candidate] (1.02 s) : 0, 1020125
Total [candidate] (10.75 s) : 0, 10750317
section appsec
Agent [baseline] (1.197 s) : 0, 1196586
Total [baseline] (10.826 s) : 0, 10825846
Agent [candidate] (1.215 s) : 0, 1215015
Total [candidate] (11.013 s) : 0, 11013308
section iast
Agent [baseline] (1.152 s) : 0, 1151859
Total [baseline] (11.102 s) : 0, 11102393
Agent [candidate] (1.156 s) : 0, 1156347
Total [candidate] (11.068 s) : 0, 11067662
section profiling
Agent [baseline] (1.162 s) : 0, 1161932
Total [baseline] (10.848 s) : 0, 10847788
Agent [candidate] (1.163 s) : 0, 1163173
Total [candidate] (10.817 s) : 0, 10817332
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.021 s -
Agent appsec 1.197 s 175.312 ms (17.2%)
Agent iast 1.152 s 130.585 ms (12.8%)
Agent profiling 1.162 s 140.659 ms (13.8%)
Total tracing 10.656 s -
Total appsec 10.826 s 170.168 ms (1.6%)
Total iast 11.102 s 446.716 ms (4.2%)
Total profiling 10.848 s 192.111 ms (1.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.02 s -
Agent appsec 1.215 s 194.89 ms (19.1%)
Agent iast 1.156 s 136.221 ms (13.4%)
Agent profiling 1.163 s 143.048 ms (14.0%)
Total tracing 10.75 s -
Total appsec 11.013 s 262.991 ms (2.4%)
Total iast 11.068 s 317.345 ms (3.0%)
Total profiling 10.817 s 67.014 ms (0.6%)
gantt
    title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~7943bc960c, baseline=1.55.0-SNAPSHOT~60c4f68423

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.468 ms) : 0, 1468
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (695.365 ms) : 0, 695365
BytebuddyAgent [candidate] (695.253 ms) : 0, 695253
GlobalTracer [baseline] (242.906 ms) : 0, 242906
GlobalTracer [candidate] (243.364 ms) : 0, 243364
AppSec [baseline] (32.209 ms) : 0, 32209
AppSec [candidate] (32.282 ms) : 0, 32282
Debugger [baseline] (6.295 ms) : 0, 6295
Debugger [candidate] (6.318 ms) : 0, 6318
Remote Config [baseline] (678.059 µs) : 0, 678
Remote Config [candidate] (679.62 µs) : 0, 680
Telemetry [baseline] (9.322 ms) : 0, 9322
Telemetry [candidate] (9.179 ms) : 0, 9179
Flare Poller [baseline] (11.809 ms) : 0, 11809
Flare Poller [candidate] (10.356 ms) : 0, 10356
section appsec
crashtracking [baseline] (1.461 ms) : 0, 1461
crashtracking [candidate] (1.467 ms) : 0, 1467
BytebuddyAgent [baseline] (719.417 ms) : 0, 719417
BytebuddyAgent [candidate] (730.555 ms) : 0, 730555
GlobalTracer [baseline] (235.057 ms) : 0, 235057
GlobalTracer [candidate] (239.161 ms) : 0, 239161
IAST [baseline] (24.95 ms) : 0, 24950
IAST [candidate] (25.524 ms) : 0, 25524
AppSec [baseline] (174.547 ms) : 0, 174547
AppSec [candidate] (177.319 ms) : 0, 177319
Debugger [baseline] (6.033 ms) : 0, 6033
Debugger [candidate] (6.233 ms) : 0, 6233
Remote Config [baseline] (633.229 µs) : 0, 633
Remote Config [candidate] (642.935 µs) : 0, 643
Telemetry [baseline] (8.547 ms) : 0, 8547
Telemetry [candidate] (8.691 ms) : 0, 8691
Flare Poller [baseline] (4.734 ms) : 0, 4734
Flare Poller [candidate] (3.999 ms) : 0, 3999
section iast
crashtracking [baseline] (1.46 ms) : 0, 1460
crashtracking [candidate] (1.455 ms) : 0, 1455
BytebuddyAgent [baseline] (815.586 ms) : 0, 815586
BytebuddyAgent [candidate] (818.269 ms) : 0, 818269
GlobalTracer [baseline] (231.498 ms) : 0, 231498
GlobalTracer [candidate] (232.867 ms) : 0, 232867
IAST [baseline] (26.813 ms) : 0, 26813
IAST [candidate] (26.922 ms) : 0, 26922
AppSec [baseline] (35.146 ms) : 0, 35146
AppSec [candidate] (35.378 ms) : 0, 35378
Debugger [baseline] (6.186 ms) : 0, 6186
Debugger [candidate] (6.212 ms) : 0, 6212
Remote Config [baseline] (618.555 µs) : 0, 619
Remote Config [candidate] (646.217 µs) : 0, 646
Telemetry [baseline] (8.821 ms) : 0, 8821
Telemetry [candidate] (8.793 ms) : 0, 8793
Flare Poller [baseline] (4.194 ms) : 0, 4194
Flare Poller [candidate] (4.303 ms) : 0, 4303
section profiling
crashtracking [baseline] (1.47 ms) : 0, 1470
crashtracking [candidate] (1.471 ms) : 0, 1471
BytebuddyAgent [baseline] (718.591 ms) : 0, 718591
BytebuddyAgent [candidate] (719.771 ms) : 0, 719771
GlobalTracer [baseline] (218.346 ms) : 0, 218346
GlobalTracer [candidate] (218.484 ms) : 0, 218484
AppSec [baseline] (32.279 ms) : 0, 32279
AppSec [candidate] (32.374 ms) : 0, 32374
Debugger [baseline] (6.711 ms) : 0, 6711
Debugger [candidate] (6.729 ms) : 0, 6729
Remote Config [baseline] (703.827 µs) : 0, 704
Remote Config [candidate] (695.326 µs) : 0, 695
Telemetry [baseline] (16.002 ms) : 0, 16002
Telemetry [candidate] (16.005 ms) : 0, 16005
Flare Poller [baseline] (4.062 ms) : 0, 4062
Flare Poller [candidate] (4.16 ms) : 0, 4160
ProfilingAgent [baseline] (110.022 ms) : 0, 110022
ProfilingAgent [candidate] (109.594 ms) : 0, 109594
Profiling [baseline] (110.664 ms) : 0, 110664
Profiling [candidate] (110.232 ms) : 0, 110232
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/add_internal_span_kind
git_commit_date 1761063603 1761067558
git_commit_sha 60c4f68 7943bc9
release_version 1.55.0-SNAPSHOT~60c4f68423 1.55.0-SNAPSHOT~7943bc960c
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1761069112 1761069112
ci_job_id 1189627517 1189627517
ci_pipeline_id 79866250 79866250
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-1-z9q3bzc0 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-1-z9q3bzc0 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 3 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.

scenario Δ mean http_req_duration Δ mean throughput candidate mean http_req_duration candidate mean throughput baseline mean http_req_duration baseline mean throughput
scenario:load:insecure-bank:no_agent:high_load worse
[+105.798µs; +219.632µs] or [+2.547%; +5.288%]
unstable
[-167.675op/s; +86.675op/s] or [-15.193%; +7.854%]
4.316ms 1063.125op/s 4.153ms 1103.625op/s
scenario:load:petclinic:no_agent:high_load better
[-1.674ms; -1.042ms] or [-4.452%; -2.771%]
unstable
[-3.854op/s; +13.104op/s] or [-3.099%; +10.537%]
36.238ms 128.988op/s 37.596ms 124.362op/s
scenario:load:petclinic:tracing:high_load worse
[+1.530ms; +2.337ms] or [+3.543%; +5.414%]
unstable
[-12.082op/s; +2.782op/s] or [-11.151%; +2.567%]
45.111ms 103.700op/s 43.178ms 108.350op/s
scenario:load:petclinic:appsec:high_load worse
[+3.250ms; +4.174ms] or [+6.984%; +8.969%]
unstable
[-14.252op/s; -0.598op/s] or [-14.176%; -0.595%]
50.246ms 93.112op/s 46.534ms 100.537op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~7943bc960c, baseline=1.55.0-SNAPSHOT~60c4f68423
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.153 ms) : 4098, 4209
.   : milestone, 4153,
iast (10.458 ms) : 10281, 10635
.   : milestone, 10458,
iast_FULL (14.709 ms) : 14414, 15004
.   : milestone, 14709,
iast_GLOBAL (10.46 ms) : 10276, 10643
.   : milestone, 10460,
profiling (8.513 ms) : 8377, 8650
.   : milestone, 8513,
tracing (7.533 ms) : 7417, 7649
.   : milestone, 7533,
section candidate
no_agent (4.316 ms) : 4266, 4366
.   : milestone, 4316,
iast (10.125 ms) : 9940, 10309
.   : milestone, 10125,
iast_FULL (14.685 ms) : 14386, 14983
.   : milestone, 14685,
iast_GLOBAL (10.74 ms) : 10548, 10933
.   : milestone, 10740,
profiling (8.419 ms) : 8293, 8544
.   : milestone, 8419,
tracing (7.602 ms) : 7489, 7715
.   : milestone, 7602,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.153 ms [4.098 ms, 4.209 ms] -
iast 10.458 ms [10.281 ms, 10.635 ms] 6.305 ms (151.8%)
iast_FULL 14.709 ms [14.414 ms, 15.004 ms] 10.556 ms (254.2%)
iast_GLOBAL 10.46 ms [10.276 ms, 10.643 ms] 6.306 ms (151.8%)
profiling 8.513 ms [8.377 ms, 8.65 ms] 4.36 ms (105.0%)
tracing 7.533 ms [7.417 ms, 7.649 ms] 3.38 ms (81.4%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.316 ms [4.266 ms, 4.366 ms] -
iast 10.125 ms [9.94 ms, 10.309 ms] 5.808 ms (134.6%)
iast_FULL 14.685 ms [14.386 ms, 14.983 ms] 10.369 ms (240.2%)
iast_GLOBAL 10.74 ms [10.548 ms, 10.933 ms] 6.424 ms (148.8%)
profiling 8.419 ms [8.293 ms, 8.544 ms] 4.103 ms (95.1%)
tracing 7.602 ms [7.489 ms, 7.715 ms] 3.286 ms (76.1%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~7943bc960c, baseline=1.55.0-SNAPSHOT~60c4f68423
    dateFormat X
    axisFormat %s
section baseline
no_agent (37.596 ms) : 37295, 37897
.   : milestone, 37596,
appsec (46.534 ms) : 46113, 46954
.   : milestone, 46534,
code_origins (43.335 ms) : 42961, 43709
.   : milestone, 43335,
iast (43.269 ms) : 42885, 43653
.   : milestone, 43269,
profiling (50.107 ms) : 49632, 50582
.   : milestone, 50107,
tracing (43.178 ms) : 42822, 43534
.   : milestone, 43178,
section candidate
no_agent (36.238 ms) : 35952, 36524
.   : milestone, 36238,
appsec (50.246 ms) : 49808, 50683
.   : milestone, 50246,
code_origins (43.514 ms) : 43141, 43887
.   : milestone, 43514,
iast (43.634 ms) : 43260, 44008
.   : milestone, 43634,
profiling (50.569 ms) : 50073, 51064
.   : milestone, 50569,
tracing (45.111 ms) : 44718, 45505
.   : milestone, 45111,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.596 ms [37.295 ms, 37.897 ms] -
appsec 46.534 ms [46.113 ms, 46.954 ms] 8.938 ms (23.8%)
code_origins 43.335 ms [42.961 ms, 43.709 ms] 5.739 ms (15.3%)
iast 43.269 ms [42.885 ms, 43.653 ms] 5.673 ms (15.1%)
profiling 50.107 ms [49.632 ms, 50.582 ms] 12.511 ms (33.3%)
tracing 43.178 ms [42.822 ms, 43.534 ms] 5.582 ms (14.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 36.238 ms [35.952 ms, 36.524 ms] -
appsec 50.246 ms [49.808 ms, 50.683 ms] 14.008 ms (38.7%)
code_origins 43.514 ms [43.141 ms, 43.887 ms] 7.276 ms (20.1%)
iast 43.634 ms [43.26 ms, 44.008 ms] 7.396 ms (20.4%)
profiling 50.569 ms [50.073 ms, 51.064 ms] 14.331 ms (39.5%)
tracing 45.111 ms [44.718 ms, 45.505 ms] 8.874 ms (24.5%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/add_internal_span_kind
git_commit_date 1761063603 1761067558
git_commit_sha 60c4f68 7943bc9
release_version 1.55.0-SNAPSHOT~60c4f68423 1.55.0-SNAPSHOT~7943bc960c
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1761069632 1761069632
ci_job_id 1189627518 1189627518
ci_pipeline_id 79866250 79866250
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-1-c36yfz2v 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-1-c36yfz2v 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 0 performance regressions! Performance is the same for 11 metrics, 0 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:dacapo:tomcat:appsec better
[-1.395ms; -1.057ms] or [-37.999%; -28.786%]
2.445ms 3.670ms
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~7943bc960c, baseline=1.55.0-SNAPSHOT~60c4f68423
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.951 s) : 14951000, 14951000
.   : milestone, 14951000,
appsec (14.888 s) : 14888000, 14888000
.   : milestone, 14888000,
iast (18.679 s) : 18679000, 18679000
.   : milestone, 18679000,
iast_GLOBAL (18.277 s) : 18277000, 18277000
.   : milestone, 18277000,
profiling (15.456 s) : 15456000, 15456000
.   : milestone, 15456000,
tracing (15.075 s) : 15075000, 15075000
.   : milestone, 15075000,
section candidate
no_agent (14.815 s) : 14815000, 14815000
.   : milestone, 14815000,
appsec (15.108 s) : 15108000, 15108000
.   : milestone, 15108000,
iast (18.562 s) : 18562000, 18562000
.   : milestone, 18562000,
iast_GLOBAL (17.924 s) : 17924000, 17924000
.   : milestone, 17924000,
profiling (16.049 s) : 16049000, 16049000
.   : milestone, 16049000,
tracing (14.819 s) : 14819000, 14819000
.   : milestone, 14819000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.951 s [14.951 s, 14.951 s] -
appsec 14.888 s [14.888 s, 14.888 s] -63.0 ms (-0.4%)
iast 18.679 s [18.679 s, 18.679 s] 3.728 s (24.9%)
iast_GLOBAL 18.277 s [18.277 s, 18.277 s] 3.326 s (22.2%)
profiling 15.456 s [15.456 s, 15.456 s] 505.0 ms (3.4%)
tracing 15.075 s [15.075 s, 15.075 s] 124.0 ms (0.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.815 s [14.815 s, 14.815 s] -
appsec 15.108 s [15.108 s, 15.108 s] 293.0 ms (2.0%)
iast 18.562 s [18.562 s, 18.562 s] 3.747 s (25.3%)
iast_GLOBAL 17.924 s [17.924 s, 17.924 s] 3.109 s (21.0%)
profiling 16.049 s [16.049 s, 16.049 s] 1.234 s (8.3%)
tracing 14.819 s [14.819 s, 14.819 s] 4.0 ms (0.0%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~7943bc960c, baseline=1.55.0-SNAPSHOT~60c4f68423
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.468 ms) : 1457, 1479
.   : milestone, 1468,
appsec (3.67 ms) : 3454, 3887
.   : milestone, 3670,
iast (2.209 ms) : 2146, 2273
.   : milestone, 2209,
iast_GLOBAL (2.245 ms) : 2181, 2309
.   : milestone, 2245,
profiling (2.077 ms) : 2023, 2130
.   : milestone, 2077,
tracing (2.021 ms) : 1971, 2070
.   : milestone, 2021,
section candidate
no_agent (1.473 ms) : 1462, 1485
.   : milestone, 1473,
appsec (2.445 ms) : 2394, 2496
.   : milestone, 2445,
iast (2.2 ms) : 2136, 2263
.   : milestone, 2200,
iast_GLOBAL (2.245 ms) : 2182, 2309
.   : milestone, 2245,
profiling (2.077 ms) : 2023, 2130
.   : milestone, 2077,
tracing (2.021 ms) : 1971, 2070
.   : milestone, 2021,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.468 ms [1.457 ms, 1.479 ms] -
appsec 3.67 ms [3.454 ms, 3.887 ms] 2.203 ms (150.0%)
iast 2.209 ms [2.146 ms, 2.273 ms] 741.443 µs (50.5%)
iast_GLOBAL 2.245 ms [2.181 ms, 2.309 ms] 777.112 µs (52.9%)
profiling 2.077 ms [2.023 ms, 2.13 ms] 608.571 µs (41.5%)
tracing 2.021 ms [1.971 ms, 2.07 ms] 552.705 µs (37.7%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.473 ms [1.462 ms, 1.485 ms] -
appsec 2.445 ms [2.394 ms, 2.496 ms] 971.539 µs (65.9%)
iast 2.2 ms [2.136 ms, 2.263 ms] 726.439 µs (49.3%)
iast_GLOBAL 2.245 ms [2.182 ms, 2.309 ms] 772.076 µs (52.4%)
profiling 2.077 ms [2.023 ms, 2.13 ms] 603.378 µs (41.0%)
tracing 2.021 ms [1.971 ms, 2.07 ms] 547.265 µs (37.1%)

@mhlidd mhlidd marked this pull request as ready for review October 17, 2025 20:10
@mhlidd mhlidd requested review from a team as code owners October 17, 2025 20:10
@mhlidd mhlidd requested review from PerfectSlayer, cecile75 and mcculls and removed request for a team October 17, 2025 20:10
Copy link
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

Sounds good but you will need to update WithSpan test suite to check for the new tag too.

@PerfectSlayer PerfectSlayer removed the comp: core Tracer core label Oct 20, 2025
@mhlidd mhlidd merged commit 5e48453 into master Oct 21, 2025
534 checks passed
@mhlidd mhlidd deleted the mhlidd/add_internal_span_kind branch October 21, 2025 19:23
@github-actions github-actions bot added this to the 1.55.0 milestone Oct 21, 2025
amarziali pushed a commit that referenced this pull request Oct 27, 2025
…n and Trace Annotations (#9759)

* re-working otel spec

* fixing muzzle

* fixing tests

* updating tests

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

Labels

inst: opentelemetry OpenTelemetry instrumentation type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants