-
Notifications
You must be signed in to change notification settings - Fork 291
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 support for meta_struct field in API v4 #7031
Add support for meta_struct field in API v4 #7031
Conversation
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.
All format changes in the file are due to spotless formatting the file in the pre-commit hook 😢
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 50 metrics, 13 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.35.0-SNAPSHOT~124f09418a, baseline=1.35.0-SNAPSHOT~d0bd085303
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.078 s) : 0, 1077708
Total [baseline] (10.471 s) : 0, 10470516
Agent [candidate] (1.094 s) : 0, 1094328
Total [candidate] (10.421 s) : 0, 10420867
section appsec
Agent [baseline] (1.202 s) : 0, 1202159
Total [baseline] (10.532 s) : 0, 10531730
Agent [candidate] (1.198 s) : 0, 1197766
Total [candidate] (10.577 s) : 0, 10577055
section iast
Agent [baseline] (1.204 s) : 0, 1204194
Total [baseline] (10.827 s) : 0, 10826529
Agent [candidate] (1.206 s) : 0, 1206461
Total [candidate] (10.775 s) : 0, 10775291
section profiling
Agent [baseline] (1.283 s) : 0, 1282750
Total [baseline] (10.776 s) : 0, 10776404
Agent [candidate] (1.283 s) : 0, 1282987
Total [candidate] (10.721 s) : 0, 10721141
gantt
title petclinic - break down per module: candidate=1.35.0-SNAPSHOT~124f09418a, baseline=1.35.0-SNAPSHOT~d0bd085303
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (674.673 ms) : 0, 674673
BytebuddyAgent [candidate] (684.699 ms) : 0, 684699
GlobalTracer [baseline] (310.572 ms) : 0, 310572
GlobalTracer [candidate] (315.481 ms) : 0, 315481
AppSec [baseline] (49.843 ms) : 0, 49843
AppSec [candidate] (50.92 ms) : 0, 50920
Remote Config [baseline] (664.249 µs) : 0, 664
Remote Config [candidate] (670.169 µs) : 0, 670
Telemetry [baseline] (7.598 ms) : 0, 7598
Telemetry [candidate] (7.684 ms) : 0, 7684
section appsec
BytebuddyAgent [baseline] (700.498 ms) : 0, 700498
BytebuddyAgent [candidate] (697.679 ms) : 0, 697679
GlobalTracer [baseline] (295.019 ms) : 0, 295019
GlobalTracer [candidate] (293.688 ms) : 0, 293688
AppSec [baseline] (153.226 ms) : 0, 153226
AppSec [candidate] (153.12 ms) : 0, 153120
IAST [baseline] (18.97 ms) : 0, 18970
IAST [candidate] (18.898 ms) : 0, 18898
Remote Config [baseline] (621.874 µs) : 0, 622
Remote Config [candidate] (622.214 µs) : 0, 622
Telemetry [baseline] (8.722 ms) : 0, 8722
Telemetry [candidate] (8.778 ms) : 0, 8778
section iast
BytebuddyAgent [baseline] (797.042 ms) : 0, 797042
BytebuddyAgent [candidate] (797.72 ms) : 0, 797720
GlobalTracer [baseline] (290.941 ms) : 0, 290941
GlobalTracer [candidate] (291.83 ms) : 0, 291830
AppSec [baseline] (51.188 ms) : 0, 51188
AppSec [candidate] (52.318 ms) : 0, 52318
IAST [baseline] (23.493 ms) : 0, 23493
IAST [candidate] (22.955 ms) : 0, 22955
Remote Config [baseline] (679.596 µs) : 0, 680
Remote Config [candidate] (596.449 µs) : 0, 596
Telemetry [baseline] (6.562 ms) : 0, 6562
Telemetry [candidate] (6.679 ms) : 0, 6679
section profiling
BytebuddyAgent [baseline] (684.417 ms) : 0, 684417
BytebuddyAgent [candidate] (683.943 ms) : 0, 683943
GlobalTracer [baseline] (385.441 ms) : 0, 385441
GlobalTracer [candidate] (386.061 ms) : 0, 386061
AppSec [baseline] (50.587 ms) : 0, 50587
AppSec [candidate] (51.306 ms) : 0, 51306
Remote Config [baseline] (733.502 µs) : 0, 734
Remote Config [candidate] (699.651 µs) : 0, 700
Telemetry [baseline] (7.567 ms) : 0, 7567
Telemetry [candidate] (7.488 ms) : 0, 7488
ProfilingAgent [baseline] (97.102 ms) : 0, 97102
ProfilingAgent [candidate] (96.71 ms) : 0, 96710
Profiling [baseline] (97.127 ms) : 0, 97127
Profiling [candidate] (96.734 ms) : 0, 96734
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.35.0-SNAPSHOT~124f09418a, baseline=1.35.0-SNAPSHOT~d0bd085303
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.088 s) : 0, 1087580
Total [baseline] (8.596 s) : 0, 8596079
Agent [candidate] (1.079 s) : 0, 1079197
Total [candidate] (8.579 s) : 0, 8579136
section iast
Agent [baseline] (1.208 s) : 0, 1207635
Total [baseline] (9.047 s) : 0, 9047044
Agent [candidate] (1.215 s) : 0, 1215372
Total [candidate] (9.062 s) : 0, 9062026
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.208 s) : 0, 1208415
Total [baseline] (9.05 s) : 0, 9050232
Agent [candidate] (1.215 s) : 0, 1214897
Total [candidate] (9.06 s) : 0, 9059501
section iast_TELEMETRY_OFF
Agent [baseline] (1.21 s) : 0, 1209978
Total [baseline] (9.02 s) : 0, 9020166
Agent [candidate] (1.206 s) : 0, 1205747
Total [candidate] (9.028 s) : 0, 9027751
gantt
title insecure-bank - break down per module: candidate=1.35.0-SNAPSHOT~124f09418a, baseline=1.35.0-SNAPSHOT~d0bd085303
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (680.931 ms) : 0, 680931
BytebuddyAgent [candidate] (675.282 ms) : 0, 675282
GlobalTracer [baseline] (313.599 ms) : 0, 313599
GlobalTracer [candidate] (311.344 ms) : 0, 311344
AppSec [baseline] (50.03 ms) : 0, 50030
AppSec [candidate] (49.875 ms) : 0, 49875
Remote Config [baseline] (663.145 µs) : 0, 663
Remote Config [candidate] (655.733 µs) : 0, 656
Telemetry [baseline] (7.669 ms) : 0, 7669
Telemetry [candidate] (7.647 ms) : 0, 7647
section iast
BytebuddyAgent [baseline] (799.864 ms) : 0, 799864
BytebuddyAgent [candidate] (804.741 ms) : 0, 804741
GlobalTracer [baseline] (291.675 ms) : 0, 291675
GlobalTracer [candidate] (293.537 ms) : 0, 293537
AppSec [baseline] (50.99 ms) : 0, 50990
AppSec [candidate] (51.554 ms) : 0, 51554
IAST [baseline] (23.491 ms) : 0, 23491
IAST [candidate] (23.395 ms) : 0, 23395
Remote Config [baseline] (584.918 µs) : 0, 585
Remote Config [candidate] (604.618 µs) : 0, 605
Telemetry [baseline] (6.591 ms) : 0, 6591
Telemetry [candidate] (6.784 ms) : 0, 6784
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (798.17 ms) : 0, 798170
BytebuddyAgent [candidate] (804.425 ms) : 0, 804425
GlobalTracer [baseline] (293.416 ms) : 0, 293416
GlobalTracer [candidate] (293.769 ms) : 0, 293769
AppSec [baseline] (51.137 ms) : 0, 51137
AppSec [candidate] (50.633 ms) : 0, 50633
IAST [baseline] (24.009 ms) : 0, 24009
IAST [candidate] (24.004 ms) : 0, 24004
Remote Config [baseline] (604.203 µs) : 0, 604
Remote Config [candidate] (599.778 µs) : 0, 600
Telemetry [baseline] (6.687 ms) : 0, 6687
Telemetry [candidate] (6.729 ms) : 0, 6729
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (800.248 ms) : 0, 800248
BytebuddyAgent [candidate] (797.319 ms) : 0, 797319
GlobalTracer [baseline] (293.362 ms) : 0, 293362
GlobalTracer [candidate] (292.851 ms) : 0, 292851
AppSec [baseline] (51.554 ms) : 0, 51554
AppSec [candidate] (51.134 ms) : 0, 51134
IAST [baseline] (22.208 ms) : 0, 22208
IAST [candidate] (22.75 ms) : 0, 22750
Remote Config [baseline] (1.426 ms) : 0, 1426
Remote Config [candidate] (596.718 µs) : 0, 597
Telemetry [baseline] (6.634 ms) : 0, 6634
Telemetry [candidate] (6.587 ms) : 0, 6587
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 17 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.35.0-SNAPSHOT~124f09418a, baseline=1.35.0-SNAPSHOT~d0bd085303
dateFormat X
axisFormat %s
section baseline
no_agent (377.339 µs) : 357, 398
. : milestone, 377,
iast (482.022 µs) : 461, 503
. : milestone, 482,
iast_FULL (550.8 µs) : 530, 572
. : milestone, 551,
iast_GLOBAL (510.465 µs) : 489, 532
. : milestone, 510,
iast_HARDCODED_SECRET_DISABLED (484.941 µs) : 464, 506
. : milestone, 485,
iast_INACTIVE (460.651 µs) : 439, 482
. : milestone, 461,
iast_TELEMETRY_OFF (480.018 µs) : 458, 502
. : milestone, 480,
tracing (441.044 µs) : 421, 461
. : milestone, 441,
section candidate
no_agent (371.018 µs) : 351, 391
. : milestone, 371,
iast (487.691 µs) : 466, 509
. : milestone, 488,
iast_FULL (557.128 µs) : 536, 578
. : milestone, 557,
iast_GLOBAL (507.48 µs) : 486, 529
. : milestone, 507,
iast_HARDCODED_SECRET_DISABLED (484.616 µs) : 464, 506
. : milestone, 485,
iast_INACTIVE (459.203 µs) : 438, 481
. : milestone, 459,
iast_TELEMETRY_OFF (481.955 µs) : 460, 503
. : milestone, 482,
tracing (444.31 µs) : 423, 465
. : milestone, 444,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.35.0-SNAPSHOT~124f09418a, baseline=1.35.0-SNAPSHOT~d0bd085303
dateFormat X
axisFormat %s
section baseline
no_agent (1.326 ms) : 1307, 1346
. : milestone, 1326,
appsec (1.732 ms) : 1708, 1756
. : milestone, 1732,
appsec_no_iast (1.696 ms) : 1671, 1721
. : milestone, 1696,
iast (1.488 ms) : 1465, 1511
. : milestone, 1488,
profiling (1.483 ms) : 1458, 1508
. : milestone, 1483,
tracing (1.465 ms) : 1440, 1489
. : milestone, 1465,
section candidate
no_agent (1.333 ms) : 1313, 1353
. : milestone, 1333,
appsec (1.723 ms) : 1699, 1746
. : milestone, 1723,
appsec_no_iast (1.715 ms) : 1691, 1740
. : milestone, 1715,
iast (1.49 ms) : 1467, 1513
. : milestone, 1490,
profiling (1.498 ms) : 1473, 1524
. : milestone, 1498,
tracing (1.468 ms) : 1443, 1493
. : milestone, 1468,
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.35.0-SNAPSHOT~124f09418a, baseline=1.35.0-SNAPSHOT~d0bd085303
dateFormat X
axisFormat %s
section baseline
no_agent (1.46 ms) : 1448, 1471
. : milestone, 1460,
appsec (2.199 ms) : 2165, 2233
. : milestone, 2199,
iast (1.958 ms) : 1916, 1999
. : milestone, 1958,
iast_GLOBAL (1.976 ms) : 1936, 2017
. : milestone, 1976,
profiling (1.834 ms) : 1802, 1866
. : milestone, 1834,
tracing (1.817 ms) : 1785, 1849
. : milestone, 1817,
section candidate
no_agent (1.461 ms) : 1449, 1472
. : milestone, 1461,
appsec (2.189 ms) : 2155, 2223
. : milestone, 2189,
iast (1.95 ms) : 1909, 1990
. : milestone, 1950,
iast_GLOBAL (1.983 ms) : 1942, 2023
. : milestone, 1983,
profiling (1.834 ms) : 1802, 1867
. : milestone, 1834,
tracing (1.833 ms) : 1801, 1865
. : milestone, 1833,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.35.0-SNAPSHOT~124f09418a, baseline=1.35.0-SNAPSHOT~d0bd085303
dateFormat X
axisFormat %s
section baseline
no_agent (15.03 s) : 15030000, 15030000
. : milestone, 15030000,
appsec (14.979 s) : 14979000, 14979000
. : milestone, 14979000,
iast (18.852 s) : 18852000, 18852000
. : milestone, 18852000,
iast_GLOBAL (17.971 s) : 17971000, 17971000
. : milestone, 17971000,
profiling (14.873 s) : 14873000, 14873000
. : milestone, 14873000,
tracing (14.777 s) : 14777000, 14777000
. : milestone, 14777000,
section candidate
no_agent (15.335 s) : 15335000, 15335000
. : milestone, 15335000,
appsec (15.165 s) : 15165000, 15165000
. : milestone, 15165000,
iast (18.642 s) : 18642000, 18642000
. : milestone, 18642000,
iast_GLOBAL (17.981 s) : 17981000, 17981000
. : milestone, 17981000,
profiling (15.856 s) : 15856000, 15856000
. : milestone, 15856000,
tracing (14.871 s) : 14871000, 14871000
. : milestone, 14871000,
|
82f6efe
to
00a70bf
Compare
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.
Looks good assuming it works with a real agent.
dd-trace-core/src/main/java/datadog/trace/common/writer/ddagent/TraceMapperV0_4.java
Outdated
Show resolved
Hide resolved
00188e2
to
124f094
Compare
2b40f78
to
af67f12
Compare
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.
Sorry for the delay!
Two minor comments about API documentation and we should be good to go
dd-trace-api/src/main/java/datadog/trace/api/internal/TraceSegment.java
Outdated
Show resolved
Hide resolved
af67f12
to
5c283c9
Compare
No worries, thanks for the review! |
5c283c9
to
4bc5b28
Compare
4bc5b28
to
4124465
Compare
What Does This Do
This PR allows adding
meta_struct
data to spans, themeta_struct
is lazy initialized to reduce memory consumption and uses a double locking mechanism to be initialized (same as baggage).Motivation
The new RASP module requires this new data structure in order to be able to send binary data efficiently to the backend.
Additional Notes
The agent fully supports
meta_struct
from version v7.35.0 (April 2022).Jira ticket: APPSEC-52826
Agent: DataDog/datadog-agent#10366
.NET: DataDog/dd-trace-dotnet#5287
JS: DataDog/dd-trace-js#4287
Sample result of adding a stack to the
metra_struct
: