-
Notifications
You must be signed in to change notification settings - Fork 318
Implementation of the open feature SDK in the java tracer #9885
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
Conversation
This comment has been minimized.
This comment has been minimized.
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 62 metrics, 3 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.56.0-SNAPSHOT~31a1f961c5, baseline=1.56.0-SNAPSHOT~b3d2c4a83d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.098 s) : 0, 1098220
Total [baseline] (10.801 s) : 0, 10800508
Agent [candidate] (1.099 s) : 0, 1098550
Total [candidate] (10.721 s) : 0, 10721355
section appsec
Agent [baseline] (1.281 s) : 0, 1280720
Total [baseline] (11.088 s) : 0, 11087847
Agent [candidate] (1.278 s) : 0, 1278259
Total [candidate] (11.1 s) : 0, 11099781
section iast
Agent [baseline] (1.256 s) : 0, 1255725
Total [baseline] (11.275 s) : 0, 11275488
Agent [candidate] (1.236 s) : 0, 1235626
Total [candidate] (11.155 s) : 0, 11155255
section profiling
Agent [baseline] (1.227 s) : 0, 1226870
Total [baseline] (11.035 s) : 0, 11034677
Agent [candidate] (1.229 s) : 0, 1229242
Total [candidate] (11.051 s) : 0, 11051090
gantt
title petclinic - break down per module: candidate=1.56.0-SNAPSHOT~31a1f961c5, baseline=1.56.0-SNAPSHOT~b3d2c4a83d
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.445 ms) : 0, 1445
crashtracking [candidate] (1.462 ms) : 0, 1462
BytebuddyAgent [baseline] (705.594 ms) : 0, 705594
BytebuddyAgent [candidate] (705.134 ms) : 0, 705134
GlobalTracer [baseline] (248.286 ms) : 0, 248286
GlobalTracer [candidate] (248.408 ms) : 0, 248408
AppSec [baseline] (32.265 ms) : 0, 32265
AppSec [candidate] (32.186 ms) : 0, 32186
Debugger [baseline] (63.605 ms) : 0, 63605
Debugger [candidate] (64.068 ms) : 0, 64068
Remote Config [baseline] (622.641 µs) : 0, 623
Remote Config [candidate] (631.918 µs) : 0, 632
Telemetry [baseline] (8.056 ms) : 0, 8056
Telemetry [candidate] (8.211 ms) : 0, 8211
Flare Poller [baseline] (3.615 ms) : 0, 3615
Flare Poller [candidate] (3.649 ms) : 0, 3649
section appsec
crashtracking [baseline] (1.46 ms) : 0, 1460
crashtracking [candidate] (1.468 ms) : 0, 1468
BytebuddyAgent [baseline] (730.918 ms) : 0, 730918
BytebuddyAgent [candidate] (729.008 ms) : 0, 729008
GlobalTracer [baseline] (240.08 ms) : 0, 240080
GlobalTracer [candidate] (240.189 ms) : 0, 240189
AppSec [baseline] (174.566 ms) : 0, 174566
AppSec [candidate] (173.955 ms) : 0, 173955
Debugger [baseline] (60.963 ms) : 0, 60963
Debugger [candidate] (61.307 ms) : 0, 61307
Remote Config [baseline] (658.079 µs) : 0, 658
Remote Config [candidate] (651.243 µs) : 0, 651
Telemetry [baseline] (8.379 ms) : 0, 8379
Telemetry [candidate] (8.204 ms) : 0, 8204
Flare Poller [baseline] (3.948 ms) : 0, 3948
Flare Poller [candidate] (3.777 ms) : 0, 3777
IAST [baseline] (24.669 ms) : 0, 24669
IAST [candidate] (24.731 ms) : 0, 24731
section iast
crashtracking [baseline] (1.486 ms) : 0, 1486
crashtracking [candidate] (1.453 ms) : 0, 1453
BytebuddyAgent [baseline] (843.466 ms) : 0, 843466
BytebuddyAgent [candidate] (827.1 ms) : 0, 827100
GlobalTracer [baseline] (240.197 ms) : 0, 240197
GlobalTracer [candidate] (237.5 ms) : 0, 237500
AppSec [baseline] (33.399 ms) : 0, 33399
AppSec [candidate] (33.397 ms) : 0, 33397
Debugger [baseline] (61.54 ms) : 0, 61540
Debugger [candidate] (61.088 ms) : 0, 61088
Remote Config [baseline] (565.418 µs) : 0, 565
Remote Config [candidate] (556.852 µs) : 0, 557
Telemetry [baseline] (7.709 ms) : 0, 7709
Telemetry [candidate] (7.724 ms) : 0, 7724
Flare Poller [baseline] (3.597 ms) : 0, 3597
Flare Poller [candidate] (3.534 ms) : 0, 3534
IAST [baseline] (28.543 ms) : 0, 28543
IAST [candidate] (28.343 ms) : 0, 28343
section profiling
crashtracking [baseline] (1.434 ms) : 0, 1434
crashtracking [candidate] (1.432 ms) : 0, 1432
BytebuddyAgent [baseline] (730.325 ms) : 0, 730325
BytebuddyAgent [candidate] (731.316 ms) : 0, 731316
GlobalTracer [baseline] (221.513 ms) : 0, 221513
GlobalTracer [candidate] (222.471 ms) : 0, 222471
AppSec [baseline] (32.245 ms) : 0, 32245
AppSec [candidate] (32.271 ms) : 0, 32271
Debugger [baseline] (62.548 ms) : 0, 62548
Debugger [candidate] (62.732 ms) : 0, 62732
Remote Config [baseline] (643.447 µs) : 0, 643
Remote Config [candidate] (641.727 µs) : 0, 642
Telemetry [baseline] (7.91 ms) : 0, 7910
Telemetry [candidate] (7.942 ms) : 0, 7942
Flare Poller [baseline] (3.767 ms) : 0, 3767
Flare Poller [candidate] (3.751 ms) : 0, 3751
ProfilingAgent [baseline] (96.913 ms) : 0, 96913
ProfilingAgent [candidate] (96.944 ms) : 0, 96944
Profiling [baseline] (97.495 ms) : 0, 97495
Profiling [candidate] (97.515 ms) : 0, 97515
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.56.0-SNAPSHOT~31a1f961c5, baseline=1.56.0-SNAPSHOT~b3d2c4a83d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.1 s) : 0, 1099512
Total [baseline] (8.833 s) : 0, 8833456
Agent [candidate] (1.1 s) : 0, 1100437
Total [candidate] (8.809 s) : 0, 8809055
section iast
Agent [baseline] (1.241 s) : 0, 1241452
Total [baseline] (9.538 s) : 0, 9537651
Agent [candidate] (1.235 s) : 0, 1235060
Total [candidate] (9.524 s) : 0, 9524368
gantt
title insecure-bank - break down per module: candidate=1.56.0-SNAPSHOT~31a1f961c5, baseline=1.56.0-SNAPSHOT~b3d2c4a83d
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.446 ms) : 0, 1446
crashtracking [candidate] (1.464 ms) : 0, 1464
BytebuddyAgent [baseline] (706.416 ms) : 0, 706416
BytebuddyAgent [candidate] (706.741 ms) : 0, 706741
GlobalTracer [baseline] (248.917 ms) : 0, 248917
GlobalTracer [candidate] (249.618 ms) : 0, 249618
AppSec [baseline] (32.52 ms) : 0, 32520
AppSec [candidate] (32.303 ms) : 0, 32303
Debugger [baseline] (63.069 ms) : 0, 63069
Debugger [candidate] (63.006 ms) : 0, 63006
Remote Config [baseline] (618.2 µs) : 0, 618
Remote Config [candidate] (638.506 µs) : 0, 639
Telemetry [baseline] (8.034 ms) : 0, 8034
Telemetry [candidate] (8.155 ms) : 0, 8155
Flare Poller [baseline] (3.68 ms) : 0, 3680
Flare Poller [candidate] (3.637 ms) : 0, 3637
section iast
crashtracking [baseline] (1.463 ms) : 0, 1463
crashtracking [candidate] (1.47 ms) : 0, 1470
BytebuddyAgent [baseline] (833.622 ms) : 0, 833622
BytebuddyAgent [candidate] (828.562 ms) : 0, 828562
GlobalTracer [baseline] (237.886 ms) : 0, 237886
GlobalTracer [candidate] (236.939 ms) : 0, 236939
AppSec [baseline] (34.75 ms) : 0, 34750
AppSec [candidate] (34.862 ms) : 0, 34862
Debugger [baseline] (60.169 ms) : 0, 60169
Debugger [candidate] (59.977 ms) : 0, 59977
Remote Config [baseline] (579.777 µs) : 0, 580
Remote Config [candidate] (539.127 µs) : 0, 539
Telemetry [baseline] (7.631 ms) : 0, 7631
Telemetry [candidate] (7.523 ms) : 0, 7523
Flare Poller [baseline] (3.492 ms) : 0, 3492
Flare Poller [candidate] (3.458 ms) : 0, 3458
IAST [baseline] (26.834 ms) : 0, 26834
IAST [candidate] (26.728 ms) : 0, 26728
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 1 performance regressions! Performance is the same for 19 metrics, 16 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~31a1f961c5, baseline=1.56.0-SNAPSHOT~b3d2c4a83d
dateFormat X
axisFormat %s
section baseline
no_agent (18.209 ms) : 18025, 18393
. : milestone, 18209,
appsec (18.675 ms) : 18486, 18864
. : milestone, 18675,
code_origins (17.879 ms) : 17699, 18060
. : milestone, 17879,
iast (17.665 ms) : 17491, 17839
. : milestone, 17665,
profiling (18.871 ms) : 18683, 19060
. : milestone, 18871,
tracing (17.645 ms) : 17470, 17820
. : milestone, 17645,
section candidate
no_agent (18.985 ms) : 18792, 19177
. : milestone, 18985,
appsec (18.544 ms) : 18360, 18728
. : milestone, 18544,
code_origins (17.44 ms) : 17268, 17612
. : milestone, 17440,
iast (18.678 ms) : 18487, 18868
. : milestone, 18678,
profiling (18.454 ms) : 18271, 18637
. : milestone, 18454,
tracing (17.908 ms) : 17728, 18089
. : milestone, 17908,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~31a1f961c5, baseline=1.56.0-SNAPSHOT~b3d2c4a83d
dateFormat X
axisFormat %s
section baseline
no_agent (1.216 ms) : 1204, 1229
. : milestone, 1216,
iast (3.226 ms) : 3180, 3272
. : milestone, 3226,
iast_FULL (5.953 ms) : 5862, 6045
. : milestone, 5953,
iast_GLOBAL (3.69 ms) : 3628, 3753
. : milestone, 3690,
profiling (2.132 ms) : 2113, 2150
. : milestone, 2132,
tracing (1.902 ms) : 1885, 1919
. : milestone, 1902,
section candidate
no_agent (1.185 ms) : 1173, 1197
. : milestone, 1185,
iast (3.338 ms) : 3288, 3388
. : milestone, 3338,
iast_FULL (5.831 ms) : 5772, 5891
. : milestone, 5831,
iast_GLOBAL (3.724 ms) : 3620, 3829
. : milestone, 3724,
profiling (2.104 ms) : 2084, 2125
. : milestone, 2104,
tracing (1.84 ms) : 1824, 1855
. : milestone, 1840,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~31a1f961c5, baseline=1.56.0-SNAPSHOT~b3d2c4a83d
dateFormat X
axisFormat %s
section baseline
no_agent (1.476 ms) : 1465, 1488
. : milestone, 1476,
appsec (3.705 ms) : 3480, 3930
. : milestone, 3705,
iast (2.221 ms) : 2156, 2287
. : milestone, 2221,
iast_GLOBAL (2.264 ms) : 2198, 2329
. : milestone, 2264,
profiling (2.089 ms) : 2034, 2143
. : milestone, 2089,
tracing (2.051 ms) : 2000, 2102
. : milestone, 2051,
section candidate
no_agent (1.477 ms) : 1465, 1488
. : milestone, 1477,
appsec (3.747 ms) : 3528, 3966
. : milestone, 3747,
iast (2.227 ms) : 2162, 2293
. : milestone, 2227,
iast_GLOBAL (2.259 ms) : 2194, 2325
. : milestone, 2259,
profiling (2.084 ms) : 2029, 2138
. : milestone, 2084,
tracing (2.048 ms) : 1997, 2099
. : milestone, 2048,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~31a1f961c5, baseline=1.56.0-SNAPSHOT~b3d2c4a83d
dateFormat X
axisFormat %s
section baseline
no_agent (14.777 s) : 14777000, 14777000
. : milestone, 14777000,
appsec (14.704 s) : 14704000, 14704000
. : milestone, 14704000,
iast (18.498 s) : 18498000, 18498000
. : milestone, 18498000,
iast_GLOBAL (18.118 s) : 18118000, 18118000
. : milestone, 18118000,
profiling (14.714 s) : 14714000, 14714000
. : milestone, 14714000,
tracing (14.543 s) : 14543000, 14543000
. : milestone, 14543000,
section candidate
no_agent (14.917 s) : 14917000, 14917000
. : milestone, 14917000,
appsec (14.966 s) : 14966000, 14966000
. : milestone, 14966000,
iast (18.671 s) : 18671000, 18671000
. : milestone, 18671000,
iast_GLOBAL (17.95 s) : 17950000, 17950000
. : milestone, 17950000,
profiling (14.72 s) : 14720000, 14720000
. : milestone, 14720000,
tracing (14.947 s) : 14947000, 14947000
. : milestone, 14947000,
|
PerfectSlayer
left a comment
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.
🎯 suggestion: Should we start having dedicated API module for the other products?
Because this is does not feel like "tracing" and I would rather not having sub-modules and third party dependencies from our public tracing API.
So what about starting a :products:open-features for your public API?
Because the direction for 2.x version will be to split all products from tracing and have them own their separate API which can have 3rd party dependency and language version requirement like yours.
8325366 to
135fcbd
Compare
Hello @PerfectSlayer, thanks for the input! I did take your suggestion into account and also removed the draft status from the PR, so feel free to continue doing the review. We should also discuss the code owners from the new module (including members of the FFE team) |
AlexeyKuznetsov-DD
left a comment
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.
left several minor comments
products/feature-flagging/lib/src/main/java/com/datadog/featureflag/ExposureWriterImpl.java
Show resolved
Hide resolved
dd-java-agent/agent-featureflag/src/main/java/com/datadog/featureflag/ExposureWriterImpl.java
Outdated
Show resolved
Hide resolved
...moke-tests/featureflag/src/main/java/datadog/smoketest/springboot/SpringbootApplication.java
Outdated
Show resolved
Hide resolved
internal-api/src/main/java/datadog/trace/api/featureflag/exposure/Allocation.java
Outdated
Show resolved
Hide resolved
internal-api/src/main/java/datadog/trace/api/featureflag/exposure/Flag.java
Outdated
Show resolved
Hide resolved
internal-api/src/main/java/datadog/trace/api/featureflag/exposure/Subject.java
Outdated
Show resolved
Hide resolved
internal-api/src/main/java/datadog/trace/api/featureflag/exposure/Variant.java
Outdated
Show resolved
Hide resolved
products/feature-flagging/api/src/main/java/datadog/trace/api/openfeature/DDEvaluator.java
Show resolved
Hide resolved
products/feature-flagging/api/src/main/java/datadog/trace/api/openfeature/DDEvaluator.java
Outdated
Show resolved
Hide resolved
7e03de2 to
738f569
Compare
0388db6 to
ca7c192
Compare
a3c9e25 to
bbf46e4
Compare
f66a140 to
9cd5aeb
Compare
It's a problem of class loaders, the |
I've moved it inside a |
PerfectSlayer
left a comment
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 for iterating with us about finding the right modular architecture 🙏
Hopefully, we can built the standalone SDK easily from here.
7550227 to
b65cb5e
Compare
dd-trace-api/src/main/java/datadog/trace/api/config/FeatureFlaggingConfig.java
Show resolved
Hide resolved
6fd2957 to
31a1f96
Compare
What Does This Do
Implements the integration of the OpenFeature SDK within the Java tracer. This includes a new umbrella module called
:products:feature-flaggingthat includes::agentfeature flagging system to be initialized by the agent during startup.:apiimplementation of the OpenFeature Java provider:libfor feature flag configuration and exposure submission through the EVP proxy.:bootstrapbridge exposing theFeatureFlagGatewayAPI between the internal:agent(datadog classloader) and the:api(application classloader)Motivation
This adds OpenFeature SDK support to the tracer so feature flag evaluations can be managed and reported consistently through the Datadog feature flagging system.
Additional Notes
Smoke tests are provided as a separate PR
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]
RFC