-
Notifications
You must be signed in to change notification settings - Fork 278
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
Ensure manually created OpenTelemetry spans are compliant with trace metrics #7138
Ensure manually created OpenTelemetry spans are compliant with trace metrics #7138
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 55 metrics, 16 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.36.0-SNAPSHOT~14f02fda23, baseline=1.36.0-SNAPSHOT~edb2c3fa17
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.585 s) : 0, 1585333
Total [baseline] (14.296 s) : 0, 14296425
Agent [candidate] (1.591 s) : 0, 1590527
Total [candidate] (14.312 s) : 0, 14311561
section appsec
Agent [baseline] (1.757 s) : 0, 1756777
Total [baseline] (14.442 s) : 0, 14441595
Agent [candidate] (1.767 s) : 0, 1766671
Total [candidate] (14.407 s) : 0, 14407146
section iast
Agent [baseline] (1.71 s) : 0, 1710302
Total [baseline] (14.745 s) : 0, 14744520
Agent [candidate] (1.716 s) : 0, 1715553
Total [candidate] (14.769 s) : 0, 14768509
section profiling
Agent [baseline] (1.89 s) : 0, 1889958
Total [baseline] (14.763 s) : 0, 14762877
Agent [candidate] (1.89 s) : 0, 1890492
Total [candidate] (14.66 s) : 0, 14659880
gantt
title petclinic - break down per module: candidate=1.36.0-SNAPSHOT~14f02fda23, baseline=1.36.0-SNAPSHOT~edb2c3fa17
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (990.168 ms) : 0, 990168
BytebuddyAgent [candidate] (993.528 ms) : 0, 993528
GlobalTracer [baseline] (451.855 ms) : 0, 451855
GlobalTracer [candidate] (452.756 ms) : 0, 452756
AppSec [baseline] (71.522 ms) : 0, 71522
AppSec [candidate] (72.05 ms) : 0, 72050
Logs Intake [baseline] (414.8 µs) : 0, 415
Logs Intake [candidate] (415.956 µs) : 0, 416
Remote Config [baseline] (887.277 µs) : 0, 887
Remote Config [candidate] (901.838 µs) : 0, 902
Telemetry [baseline] (9.848 ms) : 0, 9848
Telemetry [candidate] (9.88 ms) : 0, 9880
section appsec
BytebuddyAgent [baseline] (1.001 s) : 0, 1001314
BytebuddyAgent [candidate] (1.007 s) : 0, 1006705
GlobalTracer [baseline] (440.404 ms) : 0, 440404
GlobalTracer [candidate] (443.505 ms) : 0, 443505
AppSec [baseline] (231.385 ms) : 0, 231385
AppSec [candidate] (232.049 ms) : 0, 232049
IAST [baseline] (26.034 ms) : 0, 26034
IAST [candidate] (25.422 ms) : 0, 25422
Logs Intake [baseline] (421.868 µs) : 0, 422
Logs Intake [candidate] (425.505 µs) : 0, 426
Remote Config [baseline] (797.989 µs) : 0, 798
Remote Config [candidate] (793.961 µs) : 0, 794
Telemetry [baseline] (8.834 ms) : 0, 8834
Telemetry [candidate] (9.589 ms) : 0, 9589
section iast
BytebuddyAgent [baseline] (1.148 s) : 0, 1148455
BytebuddyAgent [candidate] (1.15 s) : 0, 1149826
GlobalTracer [baseline] (433.114 ms) : 0, 433114
GlobalTracer [candidate] (433.329 ms) : 0, 433329
AppSec [baseline] (66.122 ms) : 0, 66122
AppSec [candidate] (66.59 ms) : 0, 66590
IAST [baseline] (30.006 ms) : 0, 30006
IAST [candidate] (30.819 ms) : 0, 30819
Logs Intake [baseline] (396.676 µs) : 0, 397
Logs Intake [candidate] (390.988 µs) : 0, 391
Remote Config [baseline] (754.658 µs) : 0, 755
Remote Config [candidate] (746.471 µs) : 0, 746
Telemetry [baseline] (11.7 ms) : 0, 11700
Telemetry [candidate] (14.024 ms) : 0, 14024
section profiling
BytebuddyAgent [baseline] (982.746 ms) : 0, 982746
BytebuddyAgent [candidate] (982.416 ms) : 0, 982416
GlobalTracer [baseline] (579.264 ms) : 0, 579264
GlobalTracer [candidate] (579.847 ms) : 0, 579847
AppSec [baseline] (73.356 ms) : 0, 73356
AppSec [candidate] (72.64 ms) : 0, 72640
Logs Intake [baseline] (426.652 µs) : 0, 427
Logs Intake [candidate] (414.818 µs) : 0, 415
Remote Config [baseline] (951.588 µs) : 0, 952
Remote Config [candidate] (953.302 µs) : 0, 953
Telemetry [baseline] (9.525 ms) : 0, 9525
Telemetry [candidate] (9.476 ms) : 0, 9476
ProfilingAgent [baseline] (149.817 ms) : 0, 149817
ProfilingAgent [candidate] (151.291 ms) : 0, 151291
Profiling [baseline] (149.883 ms) : 0, 149883
Profiling [candidate] (151.356 ms) : 0, 151356
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.36.0-SNAPSHOT~14f02fda23, baseline=1.36.0-SNAPSHOT~edb2c3fa17
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.579 s) : 0, 1578503
Total [baseline] (11.912 s) : 0, 11912082
Agent [candidate] (1.586 s) : 0, 1585765
Total [candidate] (11.969 s) : 0, 11968576
section iast
Agent [baseline] (1.715 s) : 0, 1715453
Total [baseline] (12.626 s) : 0, 12625720
Agent [candidate] (1.708 s) : 0, 1707742
Total [candidate] (12.525 s) : 0, 12524929
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.711 s) : 0, 1710724
Total [baseline] (12.464 s) : 0, 12463658
Agent [candidate] (1.709 s) : 0, 1708730
Total [candidate] (12.45 s) : 0, 12450155
section iast_TELEMETRY_OFF
Agent [baseline] (1.707 s) : 0, 1707220
Total [baseline] (12.563 s) : 0, 12563018
Agent [candidate] (1.702 s) : 0, 1702487
Total [candidate] (12.53 s) : 0, 12529534
gantt
title insecure-bank - break down per module: candidate=1.36.0-SNAPSHOT~14f02fda23, baseline=1.36.0-SNAPSHOT~edb2c3fa17
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (985.198 ms) : 0, 985198
BytebuddyAgent [candidate] (989.309 ms) : 0, 989309
GlobalTracer [baseline] (450.114 ms) : 0, 450114
GlobalTracer [candidate] (452.594 ms) : 0, 452594
AppSec [baseline] (71.519 ms) : 0, 71519
AppSec [candidate] (71.859 ms) : 0, 71859
Logs Intake [baseline] (412.706 µs) : 0, 413
Logs Intake [candidate] (414.104 µs) : 0, 414
Remote Config [baseline] (891.512 µs) : 0, 892
Remote Config [candidate] (874.207 µs) : 0, 874
Telemetry [baseline] (9.743 ms) : 0, 9743
Telemetry [candidate] (9.803 ms) : 0, 9803
section iast
BytebuddyAgent [baseline] (1.151 s) : 0, 1151172
BytebuddyAgent [candidate] (1.146 s) : 0, 1145663
GlobalTracer [baseline] (434.198 ms) : 0, 434198
GlobalTracer [candidate] (431.898 ms) : 0, 431898
AppSec [baseline] (67.049 ms) : 0, 67049
AppSec [candidate] (65.861 ms) : 0, 65861
IAST [baseline] (31.122 ms) : 0, 31122
IAST [candidate] (29.975 ms) : 0, 29975
Logs Intake [baseline] (397.259 µs) : 0, 397
Logs Intake [candidate] (393.308 µs) : 0, 393
Remote Config [baseline] (764.359 µs) : 0, 764
Remote Config [candidate] (758.01 µs) : 0, 758
Telemetry [baseline] (10.91 ms) : 0, 10910
Telemetry [candidate] (13.35 ms) : 0, 13350
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (1.145 s) : 0, 1145498
BytebuddyAgent [candidate] (1.144 s) : 0, 1144114
GlobalTracer [baseline] (432.704 ms) : 0, 432704
GlobalTracer [candidate] (431.725 ms) : 0, 431725
AppSec [baseline] (67.58 ms) : 0, 67580
AppSec [candidate] (66.989 ms) : 0, 66989
IAST [baseline] (34.987 ms) : 0, 34987
IAST [candidate] (33.298 ms) : 0, 33298
Logs Intake [baseline] (383.643 µs) : 0, 384
Logs Intake [candidate] (391.388 µs) : 0, 391
Remote Config [baseline] (742.424 µs) : 0, 742
Remote Config [candidate] (773.249 µs) : 0, 773
Telemetry [baseline] (8.982 ms) : 0, 8982
Telemetry [candidate] (11.557 ms) : 0, 11557
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (1.145 s) : 0, 1145361
BytebuddyAgent [candidate] (1.141 s) : 0, 1140609
GlobalTracer [baseline] (432.689 ms) : 0, 432689
GlobalTracer [candidate] (432.576 ms) : 0, 432576
AppSec [baseline] (66.976 ms) : 0, 66976
AppSec [candidate] (68.102 ms) : 0, 68102
IAST [baseline] (31.301 ms) : 0, 31301
IAST [candidate] (30.37 ms) : 0, 30370
Logs Intake [baseline] (408.163 µs) : 0, 408
Logs Intake [candidate] (385.597 µs) : 0, 386
Remote Config [baseline] (757.522 µs) : 0, 758
Remote Config [candidate] (737.164 µs) : 0, 737
Telemetry [baseline] (9.848 ms) : 0, 9848
Telemetry [candidate] (9.766 ms) : 0, 9766
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 16 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.36.0-SNAPSHOT~14f02fda23, baseline=1.36.0-SNAPSHOT~edb2c3fa17
dateFormat X
axisFormat %s
section baseline
no_agent (1.366 ms) : 1345, 1386
. : milestone, 1366,
appsec (1.742 ms) : 1718, 1767
. : milestone, 1742,
appsec_no_iast (1.727 ms) : 1703, 1751
. : milestone, 1727,
iast (1.481 ms) : 1458, 1504
. : milestone, 1481,
profiling (1.529 ms) : 1503, 1554
. : milestone, 1529,
tracing (1.498 ms) : 1471, 1524
. : milestone, 1498,
section candidate
no_agent (1.363 ms) : 1344, 1382
. : milestone, 1363,
appsec (1.751 ms) : 1724, 1777
. : milestone, 1751,
appsec_no_iast (1.765 ms) : 1741, 1789
. : milestone, 1765,
iast (1.481 ms) : 1458, 1504
. : milestone, 1481,
profiling (1.553 ms) : 1528, 1578
. : milestone, 1553,
tracing (1.46 ms) : 1435, 1484
. : milestone, 1460,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.36.0-SNAPSHOT~14f02fda23, baseline=1.36.0-SNAPSHOT~edb2c3fa17
dateFormat X
axisFormat %s
section baseline
no_agent (374.244 µs) : 354, 394
. : milestone, 374,
iast (491.263 µs) : 470, 512
. : milestone, 491,
iast_FULL (561.178 µs) : 540, 583
. : milestone, 561,
iast_GLOBAL (514.94 µs) : 494, 536
. : milestone, 515,
iast_HARDCODED_SECRET_DISABLED (487.55 µs) : 466, 509
. : milestone, 488,
iast_INACTIVE (463.136 µs) : 442, 484
. : milestone, 463,
iast_TELEMETRY_OFF (478.347 µs) : 457, 499
. : milestone, 478,
tracing (447.873 µs) : 427, 469
. : milestone, 448,
section candidate
no_agent (372.643 µs) : 353, 392
. : milestone, 373,
iast (494.847 µs) : 474, 516
. : milestone, 495,
iast_FULL (556.741 µs) : 536, 578
. : milestone, 557,
iast_GLOBAL (509.108 µs) : 488, 530
. : milestone, 509,
iast_HARDCODED_SECRET_DISABLED (491.799 µs) : 471, 513
. : milestone, 492,
iast_INACTIVE (456.219 µs) : 435, 477
. : milestone, 456,
iast_TELEMETRY_OFF (478.042 µs) : 457, 499
. : milestone, 478,
tracing (450.198 µs) : 429, 471
. : milestone, 450,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.36.0-SNAPSHOT~14f02fda23, baseline=1.36.0-SNAPSHOT~edb2c3fa17
dateFormat X
axisFormat %s
section baseline
no_agent (1.463 ms) : 1451, 1474
. : milestone, 1463,
appsec (2.21 ms) : 2176, 2245
. : milestone, 2210,
iast (1.963 ms) : 1922, 2004
. : milestone, 1963,
iast_GLOBAL (2.009 ms) : 1967, 2050
. : milestone, 2009,
profiling (1.865 ms) : 1831, 1899
. : milestone, 1865,
tracing (1.828 ms) : 1796, 1861
. : milestone, 1828,
section candidate
no_agent (1.475 ms) : 1463, 1486
. : milestone, 1475,
appsec (2.211 ms) : 2176, 2246
. : milestone, 2211,
iast (1.961 ms) : 1920, 2001
. : milestone, 1961,
iast_GLOBAL (2.011 ms) : 1969, 2052
. : milestone, 2011,
profiling (1.848 ms) : 1814, 1882
. : milestone, 1848,
tracing (1.83 ms) : 1798, 1862
. : milestone, 1830,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.36.0-SNAPSHOT~14f02fda23, baseline=1.36.0-SNAPSHOT~edb2c3fa17
dateFormat X
axisFormat %s
section baseline
no_agent (15.208 s) : 15208000, 15208000
. : milestone, 15208000,
appsec (15.157 s) : 15157000, 15157000
. : milestone, 15157000,
iast (18.997 s) : 18997000, 18997000
. : milestone, 18997000,
iast_GLOBAL (17.862 s) : 17862000, 17862000
. : milestone, 17862000,
profiling (15.257 s) : 15257000, 15257000
. : milestone, 15257000,
tracing (14.922 s) : 14922000, 14922000
. : milestone, 14922000,
section candidate
no_agent (15.051 s) : 15051000, 15051000
. : milestone, 15051000,
appsec (14.991 s) : 14991000, 14991000
. : milestone, 14991000,
iast (18.969 s) : 18969000, 18969000
. : milestone, 18969000,
iast_GLOBAL (17.7 s) : 17700000, 17700000
. : milestone, 17700000,
profiling (15.739 s) : 15739000, 15739000
. : milestone, 15739000,
tracing (15.206 s) : 15206000, 15206000
. : milestone, 15206000,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http.request.status_code
is an int value as per otel
BUT http.status_code
is a string value following datadog standards
Just want to confirm, does this PR follow those standards?
Hi @zarirhamza - yes, If you want to follow the sequence it goes:
TL;DR is that this is the same method used by Datadog integrations in the Java tracer to set the HTTP statuis for a span, so given that is producing the right payloads this will also produce the expected payload. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR also fixes an issue where the AttributeKey form of the setAttribute method was not covered for non-array reserved attributes.
Nice catch. Do you think I should also improve the original convention tests to check builder and attribute keys too?
Yes, it would be good to do at some point |
I just made a PR about it. |
What Does This Do
Translates the
http.response.status_code
attribute (OpenTelemetry) tohttp.status_code
(Datadog)Additional Notes
This PR also fixes an issue where the
AttributeKey
form of thesetAttribute
method was not covered for non-array reserved attributes.