Spring boot: autodetect service name from environment#6663
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 8 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.31.0-SNAPSHOT~77923a8247, baseline=1.31.0-SNAPSHOT~f709af0489
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.081 s) : 0, 1081252
Total [baseline] (9.229 s) : 0, 9228595
Agent [candidate] (1.087 s) : 0, 1087032
Total [candidate] (9.24 s) : 0, 9239509
section appsec
Agent [baseline] (1.183 s) : 0, 1183020
Total [baseline] (9.43 s) : 0, 9429707
Agent [candidate] (1.18 s) : 0, 1180176
Total [candidate] (9.321 s) : 0, 9320510
section iast
Agent [baseline] (1.201 s) : 0, 1201475
Total [baseline] (9.354 s) : 0, 9354338
Agent [candidate] (1.207 s) : 0, 1207018
Total [candidate] (9.36 s) : 0, 9360085
section profiling
Agent [baseline] (1.29 s) : 0, 1289650
Total [baseline] (9.38 s) : 0, 9379525
Agent [candidate] (1.294 s) : 0, 1293621
Total [candidate] (9.364 s) : 0, 9364189
gantt
title petclinic - break down per module: candidate=1.31.0-SNAPSHOT~77923a8247, baseline=1.31.0-SNAPSHOT~f709af0489
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (687.967 ms) : 0, 687967
BytebuddyAgent [candidate] (692.096 ms) : 0, 692096
GlobalTracer [baseline] (298.745 ms) : 0, 298745
GlobalTracer [candidate] (300.289 ms) : 0, 300289
AppSec [baseline] (51.67 ms) : 0, 51670
AppSec [candidate] (51.519 ms) : 0, 51519
Remote Config [baseline] (721.796 µs) : 0, 722
Remote Config [candidate] (714.36 µs) : 0, 714
Telemetry [baseline] (7.877 ms) : 0, 7877
Telemetry [candidate] (7.799 ms) : 0, 7799
section appsec
BytebuddyAgent [baseline] (690.101 ms) : 0, 690101
BytebuddyAgent [candidate] (687.857 ms) : 0, 687857
GlobalTracer [baseline] (298.955 ms) : 0, 298955
GlobalTracer [candidate] (299.008 ms) : 0, 299008
AppSec [baseline] (151.795 ms) : 0, 151795
AppSec [candidate] (151.424 ms) : 0, 151424
Remote Config [baseline] (642.064 µs) : 0, 642
Remote Config [candidate] (637.177 µs) : 0, 637
Telemetry [baseline] (6.959 ms) : 0, 6959
Telemetry [candidate] (6.937 ms) : 0, 6937
section iast
BytebuddyAgent [baseline] (795.612 ms) : 0, 795612
BytebuddyAgent [candidate] (799.086 ms) : 0, 799086
GlobalTracer [baseline] (287.99 ms) : 0, 287990
GlobalTracer [candidate] (289.798 ms) : 0, 289798
AppSec [baseline] (54.981 ms) : 0, 54981
AppSec [candidate] (55.732 ms) : 0, 55732
Remote Config [baseline] (620.014 µs) : 0, 620
Remote Config [candidate] (635.991 µs) : 0, 636
Telemetry [baseline] (8.127 ms) : 0, 8127
Telemetry [candidate] (8.205 ms) : 0, 8205
IAST [baseline] (19.841 ms) : 0, 19841
IAST [candidate] (19.173 ms) : 0, 19173
section profiling
BytebuddyAgent [baseline] (678.036 ms) : 0, 678036
BytebuddyAgent [candidate] (679.922 ms) : 0, 679922
GlobalTracer [baseline] (379.733 ms) : 0, 379733
GlobalTracer [candidate] (381.621 ms) : 0, 381621
AppSec [baseline] (52.916 ms) : 0, 52916
AppSec [candidate] (52.881 ms) : 0, 52881
Remote Config [baseline] (750.647 µs) : 0, 751
Remote Config [candidate] (841.364 µs) : 0, 841
Telemetry [baseline] (9.601 ms) : 0, 9601
Telemetry [candidate] (9.654 ms) : 0, 9654
ProfilingAgent [baseline] (112.619 ms) : 0, 112619
ProfilingAgent [candidate] (112.626 ms) : 0, 112626
Profiling [baseline] (112.643 ms) : 0, 112643
Profiling [candidate] (112.651 ms) : 0, 112651
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 14 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.31.0-SNAPSHOT~77923a8247, baseline=1.31.0-SNAPSHOT~f709af0489
dateFormat X
axisFormat %s
section baseline
no_agent (1.346 ms) : 1327, 1365
. : milestone, 1346,
appsec (1.801 ms) : 1777, 1824
. : milestone, 1801,
iast (1.537 ms) : 1514, 1561
. : milestone, 1537,
profiling (1.552 ms) : 1526, 1578
. : milestone, 1552,
tracing (1.493 ms) : 1470, 1517
. : milestone, 1493,
section candidate
no_agent (1.358 ms) : 1339, 1378
. : milestone, 1358,
appsec (1.777 ms) : 1753, 1801
. : milestone, 1777,
iast (1.534 ms) : 1510, 1557
. : milestone, 1534,
profiling (1.568 ms) : 1543, 1593
. : milestone, 1568,
tracing (1.506 ms) : 1483, 1529
. : milestone, 1506,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.31.0-SNAPSHOT~77923a8247, baseline=1.31.0-SNAPSHOT~f709af0489
dateFormat X
axisFormat %s
section baseline
no_agent (366.598 µs) : 346, 387
. : milestone, 367,
iast (471.617 µs) : 451, 492
. : milestone, 472,
iast_FULL (538.289 µs) : 518, 559
. : milestone, 538,
iast_GLOBAL (504.221 µs) : 482, 526
. : milestone, 504,
iast_HARDCODED_SECRET_DISABLED (480.964 µs) : 460, 502
. : milestone, 481,
iast_INACTIVE (451.652 µs) : 432, 472
. : milestone, 452,
iast_TELEMETRY_OFF (472.84 µs) : 452, 494
. : milestone, 473,
tracing (447.718 µs) : 427, 469
. : milestone, 448,
section candidate
no_agent (370.335 µs) : 349, 392
. : milestone, 370,
iast (472.514 µs) : 452, 493
. : milestone, 473,
iast_FULL (536.824 µs) : 517, 557
. : milestone, 537,
iast_GLOBAL (495.812 µs) : 475, 516
. : milestone, 496,
iast_HARDCODED_SECRET_DISABLED (476.221 µs) : 456, 496
. : milestone, 476,
iast_INACTIVE (444.387 µs) : 424, 465
. : milestone, 444,
iast_TELEMETRY_OFF (474.569 µs) : 453, 496
. : milestone, 475,
tracing (445.969 µs) : 426, 466
. : milestone, 446,
|
591d64b to
529341d
Compare
PerfectSlayer
left a comment
There was a problem hiding this comment.
That’s great addition! 👍
Quick question for me: what’t the default service name when it’s not set by the customer?
Nitpick: props and args is a little hard to get from the tests. application-name-from-properties and application-name-from-cli-args would have been better 😓
Usually it's the jar name (otherwise |
529341d to
b9422a3
Compare
What Does This Do
This PR allows automatically set the default service name for a spring boot standalone application from the spring property
spring.application.nameIt applies only if:
DD_SERVICEor equivalentsspring.application.namein the spring environment (args, properties, env variables, ...)This PR modifies only the default service name generation replacing the use of the jar name with the spring application name that's more appropriate.
The instrumentation is still in beta and it has to be explicitly enabled. It can be done by setting:
DD_TRACE_INTEGRATION_SPRING_BOOT_ENABLED=true-Ddd.trace.integration.spring-boot.enabled=trueMotivation
Additional Notes
Jira ticket: AIT-9541