Tag-based sampling rules#6298
Merged
Merged
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 47 metrics, 7 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.26.0-SNAPSHOT~f46448dfab, baseline=1.26.0-SNAPSHOT~4908b2cf3e
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.046 s) : 0, 1046490
Total [baseline] (9.348 s) : 0, 9348227
Agent [candidate] (1.048 s) : 0, 1047864
Total [candidate] (9.284 s) : 0, 9284107
section appsec
Agent [baseline] (1.16 s) : 0, 1159970
Total [baseline] (9.461 s) : 0, 9461167
Agent [candidate] (1.145 s) : 0, 1144785
Total [candidate] (9.434 s) : 0, 9433596
section iast
Agent [baseline] (1.175 s) : 0, 1175102
Total [baseline] (9.591 s) : 0, 9590662
Agent [candidate] (1.17 s) : 0, 1170201
Total [candidate] (9.571 s) : 0, 9570640
section profiling
Agent [baseline] (1.261 s) : 0, 1260535
Total [baseline] (9.691 s) : 0, 9690569
Agent [candidate] (1.241 s) : 0, 1241462
Total [candidate] (9.659 s) : 0, 9658755
gantt
title petclinic - break down per module: candidate=1.26.0-SNAPSHOT~f46448dfab, baseline=1.26.0-SNAPSHOT~4908b2cf3e
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (646.566 ms) : 0, 646566
BytebuddyAgent [candidate] (647.963 ms) : 0, 647963
GlobalTracer [baseline] (306.488 ms) : 0, 306488
GlobalTracer [candidate] (306.755 ms) : 0, 306755
AppSec [baseline] (51.338 ms) : 0, 51338
AppSec [candidate] (51.052 ms) : 0, 51052
Remote Config [baseline] (668.937 µs) : 0, 669
Remote Config [candidate] (666.053 µs) : 0, 666
Telemetry [baseline] (7.12 ms) : 0, 7120
Telemetry [candidate] (7.105 ms) : 0, 7105
section appsec
BytebuddyAgent [baseline] (656.429 ms) : 0, 656429
BytebuddyAgent [candidate] (646.581 ms) : 0, 646581
GlobalTracer [baseline] (310.631 ms) : 0, 310631
GlobalTracer [candidate] (307.027 ms) : 0, 307027
AppSec [baseline] (150.585 ms) : 0, 150585
AppSec [candidate] (149.434 ms) : 0, 149434
Remote Config [baseline] (650.349 µs) : 0, 650
Remote Config [candidate] (643.674 µs) : 0, 644
Telemetry [baseline] (6.959 ms) : 0, 6959
Telemetry [candidate] (6.843 ms) : 0, 6843
section iast
BytebuddyAgent [baseline] (774.284 ms) : 0, 774284
BytebuddyAgent [candidate] (772.381 ms) : 0, 772381
GlobalTracer [baseline] (287.359 ms) : 0, 287359
GlobalTracer [candidate] (284.808 ms) : 0, 284808
AppSec [baseline] (49.528 ms) : 0, 49528
AppSec [candidate] (49.486 ms) : 0, 49486
IAST [baseline] (20.681 ms) : 0, 20681
IAST [candidate] (21.153 ms) : 0, 21153
Remote Config [baseline] (629.344 µs) : 0, 629
Remote Config [candidate] (610.405 µs) : 0, 610
Telemetry [baseline] (7.993 ms) : 0, 7993
Telemetry [candidate] (7.234 ms) : 0, 7234
section profiling
BytebuddyAgent [baseline] (667.787 ms) : 0, 667787
BytebuddyAgent [candidate] (657.532 ms) : 0, 657532
GlobalTracer [baseline] (381.946 ms) : 0, 381946
GlobalTracer [candidate] (375.307 ms) : 0, 375307
AppSec [baseline] (51.819 ms) : 0, 51819
AppSec [candidate] (51.271 ms) : 0, 51271
Remote Config [baseline] (685.188 µs) : 0, 685
Remote Config [candidate] (689.706 µs) : 0, 690
Telemetry [baseline] (7.601 ms) : 0, 7601
Telemetry [candidate] (7.49 ms) : 0, 7490
ProfilingAgent [baseline] (95.6 ms) : 0, 95600
ProfilingAgent [candidate] (95.028 ms) : 0, 95028
Profiling [baseline] (95.625 ms) : 0, 95625
Profiling [candidate] (95.052 ms) : 0, 95052
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.26.0-SNAPSHOT~f46448dfab, baseline=1.26.0-SNAPSHOT~4908b2cf3e
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.047 s) : 0, 1046709
Total [baseline] (8.709 s) : 0, 8709144
Agent [candidate] (1.047 s) : 0, 1047051
Total [candidate] (8.709 s) : 0, 8709340
section iast
Agent [baseline] (1.172 s) : 0, 1171767
Total [baseline] (9.264 s) : 0, 9264115
Agent [candidate] (1.174 s) : 0, 1174423
Total [candidate] (9.34 s) : 0, 9339811
section iast_TELEMETRY_OFF
Agent [baseline] (1.165 s) : 0, 1164688
Total [baseline] (9.267 s) : 0, 9267337
Agent [candidate] (1.163 s) : 0, 1163145
Total [candidate] (9.247 s) : 0, 9246884
gantt
title insecure-bank - break down per module: candidate=1.26.0-SNAPSHOT~f46448dfab, baseline=1.26.0-SNAPSHOT~4908b2cf3e
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (646.887 ms) : 0, 646887
BytebuddyAgent [candidate] (647.046 ms) : 0, 647046
GlobalTracer [baseline] (306.324 ms) : 0, 306324
GlobalTracer [candidate] (306.665 ms) : 0, 306665
AppSec [baseline] (51.381 ms) : 0, 51381
AppSec [candidate] (51.232 ms) : 0, 51232
Remote Config [baseline] (676.489 µs) : 0, 676
Remote Config [candidate] (672.189 µs) : 0, 672
Telemetry [baseline] (7.176 ms) : 0, 7176
Telemetry [candidate] (7.184 ms) : 0, 7184
section iast
BytebuddyAgent [baseline] (771.928 ms) : 0, 771928
BytebuddyAgent [candidate] (774.907 ms) : 0, 774907
GlobalTracer [baseline] (286.304 ms) : 0, 286304
GlobalTracer [candidate] (286.577 ms) : 0, 286577
AppSec [baseline] (49.804 ms) : 0, 49804
AppSec [candidate] (49.698 ms) : 0, 49698
IAST [baseline] (21.311 ms) : 0, 21311
IAST [candidate] (20.685 ms) : 0, 20685
Remote Config [baseline] (622.822 µs) : 0, 623
Remote Config [candidate] (631.453 µs) : 0, 631
Telemetry [baseline] (7.227 ms) : 0, 7227
Telemetry [candidate] (7.331 ms) : 0, 7331
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (766.496 ms) : 0, 766496
BytebuddyAgent [candidate] (765.863 ms) : 0, 765863
GlobalTracer [baseline] (287.598 ms) : 0, 287598
GlobalTracer [candidate] (286.969 ms) : 0, 286969
AppSec [baseline] (49.542 ms) : 0, 49542
AppSec [candidate] (49.62 ms) : 0, 49620
IAST [baseline] (18.675 ms) : 0, 18675
IAST [candidate] (18.758 ms) : 0, 18758
Remote Config [baseline] (607.948 µs) : 0, 608
Remote Config [candidate] (620.096 µs) : 0, 620
Telemetry [baseline] (7.311 ms) : 0, 7311
Telemetry [candidate] (6.767 ms) : 0, 6767
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 7 metrics, 14 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.26.0-SNAPSHOT~f46448dfab, baseline=1.26.0-SNAPSHOT~4908b2cf3e
dateFormat X
axisFormat %s
section baseline
no_agent (1.354 ms) : 1335, 1374
. : milestone, 1354,
appsec (1.74 ms) : 1715, 1764
. : milestone, 1740,
iast (1.5 ms) : 1475, 1525
. : milestone, 1500,
profiling (1.597 ms) : 1570, 1623
. : milestone, 1597,
tracing (1.485 ms) : 1461, 1510
. : milestone, 1485,
section candidate
no_agent (1.352 ms) : 1333, 1372
. : milestone, 1352,
appsec (1.76 ms) : 1734, 1786
. : milestone, 1760,
iast (1.533 ms) : 1509, 1557
. : milestone, 1533,
profiling (1.496 ms) : 1472, 1521
. : milestone, 1496,
tracing (1.494 ms) : 1470, 1518
. : milestone, 1494,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.26.0-SNAPSHOT~f46448dfab, baseline=1.26.0-SNAPSHOT~4908b2cf3e
dateFormat X
axisFormat %s
section baseline
no_agent (364.7 µs) : 344, 385
. : milestone, 365,
iast (473.077 µs) : 452, 494
. : milestone, 473,
iast_FULL (528.363 µs) : 508, 549
. : milestone, 528,
iast_INACTIVE (442.441 µs) : 421, 464
. : milestone, 442,
iast_TELEMETRY_OFF (464.906 µs) : 443, 487
. : milestone, 465,
tracing (439.463 µs) : 419, 460
. : milestone, 439,
section candidate
no_agent (368.071 µs) : 347, 389
. : milestone, 368,
iast (468.718 µs) : 448, 489
. : milestone, 469,
iast_FULL (526.679 µs) : 506, 547
. : milestone, 527,
iast_INACTIVE (434.325 µs) : 414, 455
. : milestone, 434,
iast_TELEMETRY_OFF (465.749 µs) : 445, 486
. : milestone, 466,
tracing (439.789 µs) : 419, 460
. : milestone, 440,
|
ygree
force-pushed
the
ygree/tag-based-sampling-rules
branch
from
December 5, 2023 19:43
739048a to
3934061
Compare
ygree
marked this pull request as ready for review
December 13, 2023 22:25
am312
reviewed
Dec 14, 2023
|
|
||
| private final Map<String, Matcher> matchers; | ||
|
|
||
| public TagsMatcher(Map<String, Matcher> matchers) { |
Contributor
There was a problem hiding this comment.
could this constructor be private?
| ANY | ||
| } | ||
| } | ||
| interface TraceSamplingRule extends SamplingRule {} |
Contributor
There was a problem hiding this comment.
Is it clearer if usages of TraceSamplingRule elsewhere are just replaced with SamplingRule or better to maintain the additional interface?
dougqh
reviewed
Dec 15, 2023
| "[{\"tags\": {\"env\": \"x??\"}, \"sample_rate\": 1}, {\"tags\": {\"env\": \"b?r\", \"tag\": \"f??\"}, \"sample_rate\": 0}]" | null | 0 | null | null | USER_DROP | ||
|
|
||
| // Select matching service + resource + operation + tag rules | ||
| "[{\"service\": \"service\", \"resource\": \"xxx\", \"tags\": {\"env\": \"x??\"}, \"sample_rate\": 0}, {\"service\": \"service\", \"resource\": \"resource\", \"name\": \"operation\", \"tags\": {\"env\": \"b?r\", \"tag\": \"f??\"}, \"sample_rate\": 1}]" | null | 1.0 | 50 | null | USER_KEEP |
Contributor
There was a problem hiding this comment.
Do we test numeric tags at all?
dougqh
approved these changes
Dec 15, 2023
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
This is a naive implementation of trace tag-based sampling rules.
This PR does not mean to include:
Single Span Tag-Based Sampling rules
Target Span property (root/any span)
Enable tag-based tests once this PR merged
Motivation
RFC
Additional Notes