Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add span operation naming convention #6104

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Conversation

PerfectSlayer
Copy link
Contributor

@PerfectSlayer PerfectSlayer commented Oct 26, 2023

What Does This Do

This PR introduces the new naming convention for span operation names coming from OpenTelemetry API.

Warning

This will change the operation and resource names for span issued from OpenTelemetry instrumentations.
As the OpenTelemetry instrumentation is currently in beta and the past behavior was not the one expected, no feature flag was introduce to revert to the past behavior.

Motivation

As OpenTelemetry does not have the operation name concept, it will be generated according some heuristics based on the span attributes.

Additional Notes

Jira ticket: APMJAVA-1062

@PerfectSlayer PerfectSlayer added type: enhancement inst: opentelemetry OpenTelemetry instrumentation labels Oct 26, 2023
@pr-commenter
Copy link

pr-commenter bot commented Oct 26, 2023

Benchmarks

Startup

Parameters

Baseline Candidate
commit 1.23.0-SNAPSHOT~d3871dd321 1.23.0-SNAPSHOT~843f43fa36
config baseline candidate
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
module Agent Agent
parent None None
variant iast iast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 54 cases.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.23.0-SNAPSHOT~843f43fa36, baseline=1.23.0-SNAPSHOT~d3871dd321

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.034 s) : 0, 1033819
Total [baseline] (8.757 s) : 0, 8756571
Agent [candidate] (1.035 s) : 0, 1034756
Total [candidate] (8.766 s) : 0, 8765585
section iast
Agent [baseline] (1.147 s) : 0, 1147245
Total [baseline] (9.355 s) : 0, 9355275
Agent [candidate] (1.15 s) : 0, 1150336
Total [candidate] (9.325 s) : 0, 9324800
section iast_TELEMETRY_OFF
Agent [baseline] (1.153 s) : 0, 1153273
Total [baseline] (9.322 s) : 0, 9322172
Agent [candidate] (1.157 s) : 0, 1156937
Total [candidate] (9.327 s) : 0, 9326701
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.034 s -
Agent iast 1.147 s 113.426 ms (11.0%)
Agent iast_TELEMETRY_OFF 1.153 s 119.454 ms (11.6%)
Total tracing 8.757 s -
Total iast 9.355 s 598.703 ms (6.8%)
Total iast_TELEMETRY_OFF 9.322 s 565.6 ms (6.5%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.035 s -
Agent iast 1.15 s 115.58 ms (11.2%)
Agent iast_TELEMETRY_OFF 1.157 s 122.181 ms (11.8%)
Total tracing 8.766 s -
Total iast 9.325 s 559.216 ms (6.4%)
Total iast_TELEMETRY_OFF 9.327 s 561.116 ms (6.4%)
gantt
    title insecure-bank - break down per module: candidate=1.23.0-SNAPSHOT~843f43fa36, baseline=1.23.0-SNAPSHOT~d3871dd321

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (644.032 ms) : 0, 644032
BytebuddyAgent [candidate] (645.129 ms) : 0, 645129
GlobalTracer [baseline] (294.2 ms) : 0, 294200
GlobalTracer [candidate] (294.396 ms) : 0, 294396
AppSec [baseline] (49.111 ms) : 0, 49111
AppSec [candidate] (48.808 ms) : 0, 48808
Remote Config [baseline] (701.764 µs) : 0, 702
Remote Config [candidate] (687.038 µs) : 0, 687
Telemetry [baseline] (11.337 ms) : 0, 11337
Telemetry [candidate] (11.297 ms) : 0, 11297
section iast
BytebuddyAgent [baseline] (762.208 ms) : 0, 762208
BytebuddyAgent [candidate] (766.201 ms) : 0, 766201
GlobalTracer [baseline] (272.527 ms) : 0, 272527
GlobalTracer [candidate] (274.772 ms) : 0, 274772
AppSec [baseline] (46.689 ms) : 0, 46689
AppSec [candidate] (46.838 ms) : 0, 46838
Remote Config [baseline] (574.098 µs) : 0, 574
Remote Config [candidate] (608.49 µs) : 0, 608
Telemetry [baseline] (11.804 ms) : 0, 11804
Telemetry [candidate] (10.685 ms) : 0, 10685
IAST [baseline] (18.943 ms) : 0, 18943
IAST [candidate] (16.695 ms) : 0, 16695
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (765.507 ms) : 0, 765507
BytebuddyAgent [candidate] (765.681 ms) : 0, 765681
GlobalTracer [baseline] (277.174 ms) : 0, 277174
GlobalTracer [candidate] (278.47 ms) : 0, 278470
AppSec [baseline] (47.069 ms) : 0, 47069
AppSec [candidate] (47.42 ms) : 0, 47420
Remote Config [baseline] (576.216 µs) : 0, 576
Remote Config [candidate] (575.285 µs) : 0, 575
Telemetry [baseline] (11.336 ms) : 0, 11336
Telemetry [candidate] (11.956 ms) : 0, 11956
IAST [baseline] (16.922 ms) : 0, 16922
IAST [candidate] (18.1 ms) : 0, 18100
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.23.0-SNAPSHOT~843f43fa36, baseline=1.23.0-SNAPSHOT~d3871dd321

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.036 s) : 0, 1035670
Total [baseline] (9.315 s) : 0, 9314974
Agent [candidate] (1.038 s) : 0, 1037666
Total [candidate] (9.294 s) : 0, 9294095
section appsec
Agent [baseline] (1.131 s) : 0, 1130613
Total [baseline] (9.397 s) : 0, 9397340
Agent [candidate] (1.12 s) : 0, 1120289
Total [candidate] (9.413 s) : 0, 9412786
section iast
Agent [baseline] (1.15 s) : 0, 1149809
Total [baseline] (9.494 s) : 0, 9494276
Agent [candidate] (1.151 s) : 0, 1150852
Total [candidate] (9.537 s) : 0, 9536726
section profiling
Agent [baseline] (1.22 s) : 0, 1219705
Total [baseline] (9.517 s) : 0, 9516759
Agent [candidate] (1.219 s) : 0, 1219100
Total [candidate] (9.533 s) : 0, 9533403
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.036 s -
Agent appsec 1.131 s 94.943 ms (9.2%)
Agent iast 1.15 s 114.138 ms (11.0%)
Agent profiling 1.22 s 184.034 ms (17.8%)
Total tracing 9.315 s -
Total appsec 9.397 s 82.365 ms (0.9%)
Total iast 9.494 s 179.301 ms (1.9%)
Total profiling 9.517 s 201.785 ms (2.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.038 s -
Agent appsec 1.12 s 82.623 ms (8.0%)
Agent iast 1.151 s 113.186 ms (10.9%)
Agent profiling 1.219 s 181.434 ms (17.5%)
Total tracing 9.294 s -
Total appsec 9.413 s 118.691 ms (1.3%)
Total iast 9.537 s 242.632 ms (2.6%)
Total profiling 9.533 s 239.309 ms (2.6%)
gantt
    title petclinic - break down per module: candidate=1.23.0-SNAPSHOT~843f43fa36, baseline=1.23.0-SNAPSHOT~d3871dd321

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (646.125 ms) : 0, 646125
BytebuddyAgent [candidate] (646.942 ms) : 0, 646942
GlobalTracer [baseline] (294.082 ms) : 0, 294082
GlobalTracer [candidate] (294.609 ms) : 0, 294609
AppSec [baseline] (48.926 ms) : 0, 48926
AppSec [candidate] (49.403 ms) : 0, 49403
Remote Config [baseline] (696.99 µs) : 0, 697
Remote Config [candidate] (696.333 µs) : 0, 696
Telemetry [baseline] (11.318 ms) : 0, 11318
Telemetry [candidate] (11.423 ms) : 0, 11423
section appsec
BytebuddyAgent [baseline] (652.469 ms) : 0, 652469
BytebuddyAgent [candidate] (645.8 ms) : 0, 645800
GlobalTracer [baseline] (296.367 ms) : 0, 296367
GlobalTracer [candidate] (294.217 ms) : 0, 294217
AppSec [baseline] (139.423 ms) : 0, 139423
AppSec [candidate] (138.326 ms) : 0, 138326
Remote Config [baseline] (657.564 µs) : 0, 658
Remote Config [candidate] (647.816 µs) : 0, 648
Telemetry [baseline] (6.964 ms) : 0, 6964
Telemetry [candidate] (6.899 ms) : 0, 6899
section iast
BytebuddyAgent [baseline] (765.178 ms) : 0, 765178
BytebuddyAgent [candidate] (767.015 ms) : 0, 767015
GlobalTracer [baseline] (273.918 ms) : 0, 273918
GlobalTracer [candidate] (274.326 ms) : 0, 274326
AppSec [baseline] (46.839 ms) : 0, 46839
AppSec [candidate] (47.063 ms) : 0, 47063
Remote Config [baseline] (569.033 µs) : 0, 569
Remote Config [candidate] (573.799 µs) : 0, 574
Telemetry [baseline] (12.649 ms) : 0, 12649
Telemetry [candidate] (10.674 ms) : 0, 10674
IAST [baseline] (16.144 ms) : 0, 16144
IAST [candidate] (16.654 ms) : 0, 16654
section profiling
BytebuddyAgent [baseline] (656.207 ms) : 0, 656207
BytebuddyAgent [candidate] (656.636 ms) : 0, 656636
GlobalTracer [baseline] (358.652 ms) : 0, 358652
GlobalTracer [candidate] (358.453 ms) : 0, 358453
AppSec [baseline] (49.803 ms) : 0, 49803
AppSec [candidate] (49.015 ms) : 0, 49015
Remote Config [baseline] (677.855 µs) : 0, 678
Remote Config [candidate] (644.819 µs) : 0, 645
Telemetry [baseline] (11.354 ms) : 0, 11354
Telemetry [candidate] (11.366 ms) : 0, 11366
ProfilingAgent [baseline] (88.687 ms) : 0, 88687
ProfilingAgent [candidate] (88.554 ms) : 0, 88554
Profiling [baseline] (88.712 ms) : 0, 88712
Profiling [candidate] (88.578 ms) : 0, 88578
Loading

Load

Parameters

Baseline Candidate
commit 1.23.0-SNAPSHOT~d3871dd321 1.23.0-SNAPSHOT~843f43fa36
config baseline candidate
end_time 2023-11-07T15:29:55 2023-11-07T15:46:22
start_time 2023-11-07T15:29:42 2023-11-07T15:46:09
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
variant iast iast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 22 cases.

Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.23.0-SNAPSHOT~843f43fa36, baseline=1.23.0-SNAPSHOT~d3871dd321
    dateFormat X
    axisFormat %s
section baseline
no_agent (363.614 µs) : 344, 384
.   : milestone, 364,
iast (458.864 µs) : 438, 480
.   : milestone, 459,
iast_FULL (520.946 µs) : 501, 541
.   : milestone, 521,
iast_INACTIVE (445.081 µs) : 424, 466
.   : milestone, 445,
iast_TELEMETRY_OFF (465.053 µs) : 444, 486
.   : milestone, 465,
tracing (424.304 µs) : 404, 445
.   : milestone, 424,
section candidate
no_agent (367.174 µs) : 347, 388
.   : milestone, 367,
iast (457.575 µs) : 437, 478
.   : milestone, 458,
iast_FULL (521.26 µs) : 501, 542
.   : milestone, 521,
iast_INACTIVE (433.787 µs) : 412, 456
.   : milestone, 434,
iast_TELEMETRY_OFF (452.642 µs) : 432, 473
.   : milestone, 453,
tracing (429.553 µs) : 408, 451
.   : milestone, 430,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 363.614 µs [343.535 µs, 383.693 µs] -
iast 458.864 µs [437.939 µs, 479.79 µs] 95.251 µs (26.2%)
iast_FULL 520.946 µs [500.551 µs, 541.342 µs] 157.333 µs (43.3%)
iast_INACTIVE 445.081 µs [423.753 µs, 466.409 µs] 81.467 µs (22.4%)
iast_TELEMETRY_OFF 465.053 µs [443.961 µs, 486.144 µs] 101.439 µs (27.9%)
tracing 424.304 µs [403.661 µs, 444.947 µs] 60.69 µs (16.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 367.174 µs [346.64 µs, 387.708 µs] -
iast 457.575 µs [436.978 µs, 478.171 µs] 90.4 µs (24.6%)
iast_FULL 521.26 µs [500.593 µs, 541.926 µs] 154.085 µs (42.0%)
iast_INACTIVE 433.787 µs [412.055 µs, 455.52 µs] 66.613 µs (18.1%)
iast_TELEMETRY_OFF 452.642 µs [432.22 µs, 473.065 µs] 85.468 µs (23.3%)
tracing 429.553 µs [408.366 µs, 450.74 µs] 62.378 µs (17.0%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.23.0-SNAPSHOT~843f43fa36, baseline=1.23.0-SNAPSHOT~d3871dd321
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.331 ms) : 1312, 1350
.   : milestone, 1331,
appsec (1.707 ms) : 1683, 1732
.   : milestone, 1707,
iast (1.48 ms) : 1456, 1504
.   : milestone, 1480,
profiling (1.443 ms) : 1419, 1468
.   : milestone, 1443,
tracing (1.462 ms) : 1438, 1487
.   : milestone, 1462,
section candidate
no_agent (1.344 ms) : 1325, 1364
.   : milestone, 1344,
appsec (1.718 ms) : 1693, 1743
.   : milestone, 1718,
iast (1.454 ms) : 1430, 1478
.   : milestone, 1454,
profiling (1.47 ms) : 1445, 1495
.   : milestone, 1470,
tracing (1.455 ms) : 1431, 1480
.   : milestone, 1455,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.331 ms [1.312 ms, 1.35 ms] -
appsec 1.707 ms [1.683 ms, 1.732 ms] 375.896 µs (28.2%)
iast 1.48 ms [1.456 ms, 1.504 ms] 148.984 µs (11.2%)
profiling 1.443 ms [1.419 ms, 1.468 ms] 111.974 µs (8.4%)
tracing 1.462 ms [1.438 ms, 1.487 ms] 130.966 µs (9.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.344 ms [1.325 ms, 1.364 ms] -
appsec 1.718 ms [1.693 ms, 1.743 ms] 373.648 µs (27.8%)
iast 1.454 ms [1.43 ms, 1.478 ms] 109.341 µs (8.1%)
profiling 1.47 ms [1.445 ms, 1.495 ms] 125.504 µs (9.3%)
tracing 1.455 ms [1.431 ms, 1.48 ms] 110.802 µs (8.2%)

@PerfectSlayer PerfectSlayer marked this pull request as ready for review October 27, 2023 08:48
@PerfectSlayer PerfectSlayer requested a review from a team as a code owner October 27, 2023 08:48
@PerfectSlayer PerfectSlayer force-pushed the bbujon/otel-naming branch 2 times, most recently from cbfaaf3 to 05cd818 Compare October 30, 2023 08:24
@PerfectSlayer PerfectSlayer force-pushed the bbujon/otel-naming branch 5 times, most recently from d484e1b to e651b2d Compare November 2, 2023 17:51
@PerfectSlayer PerfectSlayer force-pushed the bbujon/otel-naming branch 2 times, most recently from 95f46a2 to 36375b9 Compare November 7, 2023 14:16
Copy link
Contributor

@mcculls mcculls left a comment

Choose a reason for hiding this comment

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

LGTM

@PerfectSlayer PerfectSlayer added the tag: breaking change Breaking changes label Nov 8, 2023
@PerfectSlayer PerfectSlayer merged commit 376c39b into master Nov 10, 2023
64 of 69 checks passed
@PerfectSlayer PerfectSlayer deleted the bbujon/otel-naming branch November 10, 2023 07:33
@github-actions github-actions bot added this to the 1.24.0 milestone Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inst: opentelemetry OpenTelemetry instrumentation tag: breaking change Breaking changes type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants