-
Notifications
You must be signed in to change notification settings - Fork 309
Add peer tags, span kind and trace root flag to MetricKey bucket #9178
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
base: master
Are you sure you want to change the base?
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 44 metrics, 9 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.52.0-SNAPSHOT~3e3c914edf, baseline=1.52.0-SNAPSHOT~d9df78f4c9
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.006 s) : 0, 1006491
Total [baseline] (10.658 s) : 0, 10658461
Agent [candidate] (994.883 ms) : 0, 994883
Total [candidate] (10.523 s) : 0, 10522836
section appsec
Agent [baseline] (1.175 s) : 0, 1175185
Total [baseline] (10.714 s) : 0, 10713930
Agent [candidate] (1.175 s) : 0, 1174876
Total [candidate] (10.748 s) : 0, 10747527
section iast
Agent [baseline] (1.128 s) : 0, 1128488
Total [baseline] (10.798 s) : 0, 10798093
Agent [candidate] (1.133 s) : 0, 1133474
Total [candidate] (10.859 s) : 0, 10858749
section profiling
Agent [baseline] (1.245 s) : 0, 1245091
Total [baseline] (10.898 s) : 0, 10897609
Agent [candidate] (1.244 s) : 0, 1243664
Total [candidate] (10.91 s) : 0, 10909517
gantt
title petclinic - break down per module: candidate=1.52.0-SNAPSHOT~3e3c914edf, baseline=1.52.0-SNAPSHOT~d9df78f4c9
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (692.475 ms) : 0, 692475
BytebuddyAgent [candidate] (686.095 ms) : 0, 686095
GlobalTracer [baseline] (246.738 ms) : 0, 246738
GlobalTracer [candidate] (242.694 ms) : 0, 242694
AppSec [baseline] (31.138 ms) : 0, 31138
AppSec [candidate] (30.307 ms) : 0, 30307
Debugger [baseline] (6.101 ms) : 0, 6101
Debugger [candidate] (5.979 ms) : 0, 5979
Remote Config [baseline] (685.746 µs) : 0, 686
Remote Config [candidate] (685.359 µs) : 0, 685
Telemetry [baseline] (8.311 ms) : 0, 8311
Telemetry [candidate] (8.225 ms) : 0, 8225
section appsec
BytebuddyAgent [baseline] (709.16 ms) : 0, 709160
BytebuddyAgent [candidate] (709.12 ms) : 0, 709120
GlobalTracer [baseline] (236.237 ms) : 0, 236237
GlobalTracer [candidate] (235.527 ms) : 0, 235527
AppSec [baseline] (171.213 ms) : 0, 171213
AppSec [candidate] (171.261 ms) : 0, 171261
Debugger [baseline] (5.707 ms) : 0, 5707
Debugger [candidate] (5.764 ms) : 0, 5764
Remote Config [baseline] (605.39 µs) : 0, 605
Remote Config [candidate] (611.527 µs) : 0, 612
Telemetry [baseline] (7.994 ms) : 0, 7994
Telemetry [candidate] (8.109 ms) : 0, 8109
IAST [baseline] (23.283 ms) : 0, 23283
IAST [candidate] (23.618 ms) : 0, 23618
section iast
BytebuddyAgent [baseline] (802.724 ms) : 0, 802724
BytebuddyAgent [candidate] (806.212 ms) : 0, 806212
GlobalTracer [baseline] (233.286 ms) : 0, 233286
GlobalTracer [candidate] (233.834 ms) : 0, 233834
AppSec [baseline] (28.805 ms) : 0, 28805
AppSec [candidate] (32.527 ms) : 0, 32527
Debugger [baseline] (5.738 ms) : 0, 5738
Debugger [candidate] (5.732 ms) : 0, 5732
Remote Config [baseline] (563.153 µs) : 0, 563
Remote Config [candidate] (589.098 µs) : 0, 589
Telemetry [baseline] (7.865 ms) : 0, 7865
Telemetry [candidate] (7.948 ms) : 0, 7948
IAST [baseline] (28.706 ms) : 0, 28706
IAST [candidate] (25.715 ms) : 0, 25715
section profiling
ProfilingAgent [baseline] (103.176 ms) : 0, 103176
ProfilingAgent [candidate] (103.157 ms) : 0, 103157
BytebuddyAgent [baseline] (676.394 ms) : 0, 676394
BytebuddyAgent [candidate] (677.089 ms) : 0, 677089
GlobalTracer [baseline] (363.389 ms) : 0, 363389
GlobalTracer [candidate] (361.592 ms) : 0, 361592
AppSec [baseline] (31.277 ms) : 0, 31277
AppSec [candidate] (33.77 ms) : 0, 33770
Debugger [baseline] (11.985 ms) : 0, 11985
Debugger [candidate] (10.568 ms) : 0, 10568
Remote Config [baseline] (658.4 µs) : 0, 658
Remote Config [candidate] (660.24 µs) : 0, 660
Telemetry [baseline] (9.513 ms) : 0, 9513
Telemetry [candidate] (8.05 ms) : 0, 8050
Profiling [baseline] (103.201 ms) : 0, 103201
Profiling [candidate] (103.182 ms) : 0, 103182
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.52.0-SNAPSHOT~3e3c914edf, baseline=1.52.0-SNAPSHOT~d9df78f4c9
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (996.382 ms) : 0, 996382
Total [baseline] (8.586 s) : 0, 8585866
Agent [candidate] (993.166 ms) : 0, 993166
Total [candidate] (8.569 s) : 0, 8569177
section iast
Agent [baseline] (1.132 s) : 0, 1131571
Total [baseline] (9.264 s) : 0, 9264374
Agent [candidate] (1.133 s) : 0, 1133193
Total [candidate] (9.242 s) : 0, 9241937
gantt
title insecure-bank - break down per module: candidate=1.52.0-SNAPSHOT~3e3c914edf, baseline=1.52.0-SNAPSHOT~d9df78f4c9
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (686.134 ms) : 0, 686134
BytebuddyAgent [candidate] (685.273 ms) : 0, 685273
GlobalTracer [baseline] (243.741 ms) : 0, 243741
GlobalTracer [candidate] (241.885 ms) : 0, 241885
AppSec [baseline] (30.694 ms) : 0, 30694
AppSec [candidate] (30.379 ms) : 0, 30379
Debugger [baseline] (6.065 ms) : 0, 6065
Debugger [candidate] (6.016 ms) : 0, 6016
Remote Config [baseline] (684.09 µs) : 0, 684
Remote Config [candidate] (683.765 µs) : 0, 684
Telemetry [baseline] (8.2 ms) : 0, 8200
Telemetry [candidate] (8.215 ms) : 0, 8215
section iast
BytebuddyAgent [baseline] (804.059 ms) : 0, 804059
BytebuddyAgent [candidate] (806.784 ms) : 0, 806784
GlobalTracer [baseline] (233.848 ms) : 0, 233848
GlobalTracer [candidate] (233.185 ms) : 0, 233185
AppSec [baseline] (33.42 ms) : 0, 33420
AppSec [candidate] (30.572 ms) : 0, 30572
Debugger [baseline] (5.687 ms) : 0, 5687
Debugger [candidate] (6.646 ms) : 0, 6646
Remote Config [baseline] (566.83 µs) : 0, 567
Remote Config [candidate] (585.868 µs) : 0, 586
Telemetry [baseline] (7.886 ms) : 0, 7886
Telemetry [candidate] (7.877 ms) : 0, 7877
IAST [baseline] (25.172 ms) : 0, 25172
IAST [candidate] (26.693 ms) : 0, 26693
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 2 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~3e3c914edf, baseline=1.52.0-SNAPSHOT~d9df78f4c9
dateFormat X
axisFormat %s
section baseline
no_agent (36.031 ms) : 35736, 36326
. : milestone, 36031,
appsec (47.421 ms) : 46990, 47852
. : milestone, 47421,
code_origins (45.311 ms) : 44920, 45702
. : milestone, 45311,
iast (44.822 ms) : 44445, 45199
. : milestone, 44822,
profiling (48.62 ms) : 48132, 49109
. : milestone, 48620,
tracing (44.634 ms) : 44269, 45000
. : milestone, 44634,
section candidate
no_agent (36.663 ms) : 36368, 36958
. : milestone, 36663,
appsec (48.135 ms) : 47687, 48583
. : milestone, 48135,
code_origins (45.551 ms) : 45171, 45931
. : milestone, 45551,
iast (45.408 ms) : 45015, 45801
. : milestone, 45408,
profiling (50.836 ms) : 50338, 51333
. : milestone, 50836,
tracing (42.389 ms) : 42037, 42740
. : milestone, 42389,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~3e3c914edf, baseline=1.52.0-SNAPSHOT~d9df78f4c9
dateFormat X
axisFormat %s
section baseline
no_agent (4.312 ms) : 4256, 4368
. : milestone, 4312,
iast (9.364 ms) : 9202, 9527
. : milestone, 9364,
iast_FULL (13.962 ms) : 13681, 14243
. : milestone, 13962,
iast_GLOBAL (10.509 ms) : 10324, 10693
. : milestone, 10509,
profiling (8.774 ms) : 8640, 8908
. : milestone, 8774,
tracing (7.708 ms) : 7599, 7817
. : milestone, 7708,
section candidate
no_agent (4.25 ms) : 4196, 4304
. : milestone, 4250,
iast (9.455 ms) : 9293, 9617
. : milestone, 9455,
iast_FULL (14.073 ms) : 13791, 14354
. : milestone, 14073,
iast_GLOBAL (10.236 ms) : 10055, 10417
. : milestone, 10236,
profiling (9.155 ms) : 8987, 9322
. : milestone, 9155,
tracing (7.511 ms) : 7401, 7620
. : milestone, 7511,
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.52.0-SNAPSHOT~3e3c914edf, baseline=1.52.0-SNAPSHOT~d9df78f4c9
dateFormat X
axisFormat %s
section baseline
no_agent (1.482 ms) : 1471, 1494
. : milestone, 1482,
appsec (2.43 ms) : 2379, 2480
. : milestone, 2430,
iast (2.215 ms) : 2152, 2278
. : milestone, 2215,
iast_GLOBAL (2.264 ms) : 2201, 2328
. : milestone, 2264,
profiling (2.065 ms) : 2014, 2116
. : milestone, 2065,
tracing (2.023 ms) : 1974, 2071
. : milestone, 2023,
section candidate
no_agent (1.484 ms) : 1473, 1496
. : milestone, 1484,
appsec (2.43 ms) : 2379, 2481
. : milestone, 2430,
iast (2.211 ms) : 2148, 2275
. : milestone, 2211,
iast_GLOBAL (2.259 ms) : 2195, 2323
. : milestone, 2259,
profiling (2.073 ms) : 2020, 2126
. : milestone, 2073,
tracing (2.027 ms) : 1977, 2076
. : milestone, 2027,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.52.0-SNAPSHOT~3e3c914edf, baseline=1.52.0-SNAPSHOT~d9df78f4c9
dateFormat X
axisFormat %s
section baseline
no_agent (15.528 s) : 15528000, 15528000
. : milestone, 15528000,
appsec (14.644 s) : 14644000, 14644000
. : milestone, 14644000,
iast (18.879 s) : 18879000, 18879000
. : milestone, 18879000,
iast_GLOBAL (17.928 s) : 17928000, 17928000
. : milestone, 17928000,
profiling (15.769 s) : 15769000, 15769000
. : milestone, 15769000,
tracing (14.815 s) : 14815000, 14815000
. : milestone, 14815000,
section candidate
no_agent (15.622 s) : 15622000, 15622000
. : milestone, 15622000,
appsec (14.866 s) : 14866000, 14866000
. : milestone, 14866000,
iast (18.376 s) : 18376000, 18376000
. : milestone, 18376000,
iast_GLOBAL (17.943 s) : 17943000, 17943000
. : milestone, 17943000,
profiling (15.255 s) : 15255000, 15255000
. : milestone, 15255000,
tracing (14.721 s) : 14721000, 14721000
. : milestone, 14721000,
|
8c4a17b
to
3e3c914
Compare
1 * writer.add(new MetricKey("resource", "service", "operation", "type", HTTP_OK, false), _) >> { MetricKey key, AggregateMetric value -> | ||
value.getHitCount() == 1 && value.getTopLevelCount() == 1 && value.getDuration() == 100 | ||
} |
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.
1 * writer.add(…, _) >> { MetricKey key, AggregateMetric value -> some assertions }
FYI, these spock code are incorrect, it tries to verify the AggregateMetric
, but actually nothing is properly verified, because >>
indicates a stub, which is incorrect since it appears in the then
section with a verification.
Instead, the verification code should be written this way, with an argument constraint :
1 * writer.add(…, { AggregateMetric value -> some assertions })
for (String peerTag : features.peerTags()) { | ||
Object value = span.getTag(peerTag); | ||
if (value != null) { | ||
peerTags.add(peerTag + ":" + TraceUtils.normalizeTag(value.toString())); |
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.
I would avoid creating a lot of new strings here. Instead we can return a map view of the tracer tags (a view returning only entries whose key is in peerTags) and write directly key
then :
then normalize(value)
on the messagepack writer. It will avoid create a string here.
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.
A simplified version is just to hold key, value here (so that we can use them for the hashtag) but not concat the key:value
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.
Thanks, we're thinking alike!
I had the same thought about String
creation. I tried a StringBuilder
approach, but without notable benefit in the end on the serialization side, especially since UTF8BytesString
actually creates a full String
anyway.
The issue with keeping a map view, is it requires to create UTF8BytesString
each time this key is serialized. I'll try to come up with a solution that balances both.
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.
Yes as an idea that can split in a couple of things.
First the need not to concatenate strings. For this you can just store the key in a list of UTF8ByteString (since they peerTags are quite stable they can be converted once anyway) and value in of List<String>
and in SerializingMetricWriter
just write first the key then :
than the normalised value.
I don't think that the values can be efficiently cached since we don't know the cardinality in advance. Converting in UTF8 each time should be fine for now
What Does This Do
This fills the gap regarding peer tags, by declaring the in the
MetricKey
.Motivation
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]