- Notifications
You must be signed in to change notification settings - Fork 315
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
base: master
Are you sure you want to change the base?
Conversation
| 🎯 Code Coverage 🔗 Commit SHA: 6d05d9a | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 6 unstable metrics. Startup time reports for insecure-bankgantt title insecure-bank - global startup overhead: candidate=1.56.0-SNAPSHOT~6d05d9a22e, baseline=1.56.0-SNAPSHOT~37a6360670 dateFormat X axisFormat %s section tracing Agent [baseline] (1.099 s) : 0, 1098676 Total [baseline] (8.825 s) : 0, 8824895 Agent [candidate] (1.097 s) : 0, 1097036 Total [candidate] (8.836 s) : 0, 8836082 section iast Agent [baseline] (1.238 s) : 0, 1238360 Total [baseline] (9.529 s) : 0, 9528981 Agent [candidate] (1.237 s) : 0, 1236952 Total [candidate] (9.545 s) : 0, 9544754
gantt title insecure-bank - break down per module: candidate=1.56.0-SNAPSHOT~6d05d9a22e, baseline=1.56.0-SNAPSHOT~37a6360670 dateFormat X axisFormat %s section tracing crashtracking [baseline] (1.458 ms) : 0, 1458 crashtracking [candidate] (1.465 ms) : 0, 1465 BytebuddyAgent [baseline] (706.468 ms) : 0, 706468 BytebuddyAgent [candidate] (705.299 ms) : 0, 705299 GlobalTracer [baseline] (248.103 ms) : 0, 248103 GlobalTracer [candidate] (248.056 ms) : 0, 248056 AppSec [baseline] (32.149 ms) : 0, 32149 AppSec [candidate] (32.254 ms) : 0, 32254 Debugger [baseline] (63.253 ms) : 0, 63253 Debugger [candidate] (62.874 ms) : 0, 62874 Remote Config [baseline] (641.917 µs) : 0, 642 Remote Config [candidate] (620.749 µs) : 0, 621 Telemetry [baseline] (8.138 ms) : 0, 8138 Telemetry [candidate] (8.086 ms) : 0, 8086 Flare Poller [baseline] (3.688 ms) : 0, 3688 Flare Poller [candidate] (3.665 ms) : 0, 3665 section iast crashtracking [baseline] (1.47 ms) : 0, 1470 crashtracking [candidate] (1.461 ms) : 0, 1461 BytebuddyAgent [baseline] (829.93 ms) : 0, 829930 BytebuddyAgent [candidate] (829.458 ms) : 0, 829458 GlobalTracer [baseline] (238.015 ms) : 0, 238015 GlobalTracer [candidate] (238.392 ms) : 0, 238392 IAST [baseline] (27.392 ms) : 0, 27392 IAST [candidate] (28.025 ms) : 0, 28025 AppSec [baseline] (34.302 ms) : 0, 34302 AppSec [candidate] (33.066 ms) : 0, 33066 Debugger [baseline] (60.615 ms) : 0, 60615 Debugger [candidate] (60.048 ms) : 0, 60048 Remote Config [baseline] (546.058 µs) : 0, 546 Remote Config [candidate] (552.84 µs) : 0, 553 Telemetry [baseline] (7.714 ms) : 0, 7714 Telemetry [candidate] (7.702 ms) : 0, 7702 Flare Poller [baseline] (3.487 ms) : 0, 3487 Flare Poller [candidate] (3.427 ms) : 0, 3427 Startup time reports for petclinicgantt title petclinic - global startup overhead: candidate=1.56.0-SNAPSHOT~6d05d9a22e, baseline=1.56.0-SNAPSHOT~37a6360670 dateFormat X axisFormat %s section tracing Agent [baseline] (1.104 s) : 0, 1103982 Total [baseline] (10.82 s) : 0, 10819815 Agent [candidate] (1.096 s) : 0, 1096498 Total [candidate] (10.744 s) : 0, 10744265 section appsec Agent [baseline] (1.28 s) : 0, 1279780 Total [baseline] (11.111 s) : 0, 11111203 Agent [candidate] (1.289 s) : 0, 1288791 Total [candidate] (11.039 s) : 0, 11039140 section iast Agent [baseline] (1.237 s) : 0, 1236547 Total [baseline] (11.299 s) : 0, 11299255 Agent [candidate] (1.246 s) : 0, 1246448 Total [candidate] (11.219 s) : 0, 11219392 section profiling Agent [baseline] (1.227 s) : 0, 1227327 Total [baseline] (11.035 s) : 0, 11035230 Agent [candidate] (1.231 s) : 0, 1230858 Total [candidate] (10.989 s) : 0, 10988614
gantt title petclinic - break down per module: candidate=1.56.0-SNAPSHOT~6d05d9a22e, baseline=1.56.0-SNAPSHOT~37a6360670 dateFormat X axisFormat %s section tracing crashtracking [baseline] (1.469 ms) : 0, 1469 crashtracking [candidate] (1.466 ms) : 0, 1466 BytebuddyAgent [baseline] (709.122 ms) : 0, 709122 BytebuddyAgent [candidate] (703.985 ms) : 0, 703985 GlobalTracer [baseline] (248.863 ms) : 0, 248863 GlobalTracer [candidate] (247.936 ms) : 0, 247936 AppSec [baseline] (32.347 ms) : 0, 32347 AppSec [candidate] (32.153 ms) : 0, 32153 Debugger [baseline] (64.729 ms) : 0, 64729 Debugger [candidate] (63.891 ms) : 0, 63891 Remote Config [baseline] (645.666 µs) : 0, 646 Remote Config [candidate] (626.13 µs) : 0, 626 Telemetry [baseline] (8.21 ms) : 0, 8210 Telemetry [candidate] (8.073 ms) : 0, 8073 Flare Poller [baseline] (3.681 ms) : 0, 3681 Flare Poller [candidate] (3.643 ms) : 0, 3643 section appsec crashtracking [baseline] (1.464 ms) : 0, 1464 crashtracking [candidate] (1.471 ms) : 0, 1471 BytebuddyAgent [baseline] (730.564 ms) : 0, 730564 BytebuddyAgent [candidate] (734.877 ms) : 0, 734877 GlobalTracer [baseline] (240.82 ms) : 0, 240820 GlobalTracer [candidate] (242.298 ms) : 0, 242298 AppSec [baseline] (174.035 ms) : 0, 174035 AppSec [candidate] (175.036 ms) : 0, 175036 Debugger [baseline] (60.57 ms) : 0, 60570 Debugger [candidate] (62.016 ms) : 0, 62016 Remote Config [baseline] (681.452 µs) : 0, 681 Remote Config [candidate] (734.46 µs) : 0, 734 Telemetry [baseline] (8.157 ms) : 0, 8157 Telemetry [candidate] (8.34 ms) : 0, 8340 Flare Poller [baseline] (3.804 ms) : 0, 3804 Flare Poller [candidate] (3.872 ms) : 0, 3872 IAST [baseline] (24.81 ms) : 0, 24810 IAST [candidate] (25.002 ms) : 0, 25002 section iast crashtracking [baseline] (1.468 ms) : 0, 1468 crashtracking [candidate] (1.464 ms) : 0, 1464 BytebuddyAgent [baseline] (827.968 ms) : 0, 827968 BytebuddyAgent [candidate] (835.593 ms) : 0, 835593 GlobalTracer [baseline] (237.985 ms) : 0, 237985 GlobalTracer [candidate] (239.05 ms) : 0, 239050 AppSec [baseline] (31.593 ms) : 0, 31593 AppSec [candidate] (34.146 ms) : 0, 34146 Debugger [baseline] (60.979 ms) : 0, 60979 Debugger [candidate] (61.656 ms) : 0, 61656 Remote Config [baseline] (563.517 µs) : 0, 564 Remote Config [candidate] (559.611 µs) : 0, 560 Telemetry [baseline] (7.714 ms) : 0, 7714 Telemetry [candidate] (7.731 ms) : 0, 7731 Flare Poller [baseline] (3.532 ms) : 0, 3532 Flare Poller [candidate] (3.516 ms) : 0, 3516 IAST [baseline] (29.896 ms) : 0, 29896 IAST [candidate] (27.745 ms) : 0, 27745 section profiling ProfilingAgent [baseline] (96.75 ms) : 0, 96750 ProfilingAgent [candidate] (98.251 ms) : 0, 98251 crashtracking [baseline] (1.452 ms) : 0, 1452 crashtracking [candidate] (1.47 ms) : 0, 1470 BytebuddyAgent [baseline] (729.515 ms) : 0, 729515 BytebuddyAgent [candidate] (731.432 ms) : 0, 731432 GlobalTracer [baseline] (222.508 ms) : 0, 222508 GlobalTracer [candidate] (221.853 ms) : 0, 221853 AppSec [baseline] (32.131 ms) : 0, 32131 AppSec [candidate] (32.18 ms) : 0, 32180 Debugger [baseline] (62.871 ms) : 0, 62871 Debugger [candidate] (63.295 ms) : 0, 63295 Remote Config [baseline] (646.797 µs) : 0, 647 Remote Config [candidate] (662.105 µs) : 0, 662 Telemetry [baseline] (8.098 ms) : 0, 8098 Telemetry [candidate] (8.024 ms) : 0, 8024 Flare Poller [baseline] (3.82 ms) : 0, 3820 Flare Poller [candidate] (3.808 ms) : 0, 3808 Profiling [baseline] (97.33 ms) : 0, 97330 Profiling [candidate] (98.833 ms) : 0, 98833 LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 2 performance regressions! Performance is the same for 17 metrics, 16 unstable metrics.
Request duration reports for petclinicgantt title petclinic - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~6d05d9a22e, baseline=1.56.0-SNAPSHOT~37a6360670 dateFormat X axisFormat %s section baseline no_agent (19.081 ms) : 18880, 19282 . : milestone, 19081, appsec (18.409 ms) : 18225, 18593 . : milestone, 18409, code_origins (17.695 ms) : 17517, 17874 . : milestone, 17695, iast (17.746 ms) : 17567, 17924 . : milestone, 17746, profiling (18.757 ms) : 18564, 18951 . : milestone, 18757, tracing (17.443 ms) : 17271, 17614 . : milestone, 17443, section candidate no_agent (16.93 ms) : 16761, 17100 . : milestone, 16930, appsec (19.407 ms) : 19212, 19603 . : milestone, 19407, code_origins (17.592 ms) : 17419, 17765 . : milestone, 17592, iast (17.737 ms) : 17560, 17915 . : milestone, 17737, profiling (18.417 ms) : 18234, 18601 . : milestone, 18417, tracing (17.856 ms) : 17678, 18034 . : milestone, 17856,
Request duration reports for insecure-bankgantt title insecure-bank - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~6d05d9a22e, baseline=1.56.0-SNAPSHOT~37a6360670 dateFormat X axisFormat %s section baseline no_agent (1.207 ms) : 1195, 1219 . : milestone, 1207, iast (3.287 ms) : 3240, 3334 . : milestone, 3287, iast_FULL (6.071 ms) : 6008, 6133 . : milestone, 6071, iast_GLOBAL (3.708 ms) : 3653, 3764 . : milestone, 3708, profiling (1.942 ms) : 1925, 1959 . : milestone, 1942, tracing (1.802 ms) : 1786, 1818 . : milestone, 1802, section candidate no_agent (1.2 ms) : 1188, 1212 . : milestone, 1200, iast (3.241 ms) : 3196, 3287 . : milestone, 3241, iast_FULL (5.911 ms) : 5851, 5971 . : milestone, 5911, iast_GLOBAL (3.606 ms) : 3554, 3658 . : milestone, 3606, profiling (2.062 ms) : 2044, 2081 . : milestone, 2062, tracing (1.823 ms) : 1807, 1838 . : milestone, 1823,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for biojavagantt title biojava - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~6d05d9a22e, baseline=1.56.0-SNAPSHOT~37a6360670 dateFormat X axisFormat %s section baseline no_agent (15.597 s) : 15597000, 15597000 . : milestone, 15597000, appsec (15.157 s) : 15157000, 15157000 . : milestone, 15157000, iast (18.711 s) : 18711000, 18711000 . : milestone, 18711000, iast_GLOBAL (17.998 s) : 17998000, 17998000 . : milestone, 17998000, profiling (14.796 s) : 14796000, 14796000 . : milestone, 14796000, tracing (14.908 s) : 14908000, 14908000 . : milestone, 14908000, section candidate no_agent (14.864 s) : 14864000, 14864000 . : milestone, 14864000, appsec (14.706 s) : 14706000, 14706000 . : milestone, 14706000, iast (18.762 s) : 18762000, 18762000 . : milestone, 18762000, iast_GLOBAL (17.786 s) : 17786000, 17786000 . : milestone, 17786000, profiling (15.032 s) : 15032000, 15032000 . : milestone, 15032000, tracing (14.902 s) : 14902000, 14902000 . : milestone, 14902000,
Execution time for tomcatgantt title tomcat - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~6d05d9a22e, baseline=1.56.0-SNAPSHOT~37a6360670 dateFormat X axisFormat %s section baseline no_agent (1.475 ms) : 1463, 1486 . : milestone, 1475, appsec (3.641 ms) : 3426, 3856 . : milestone, 3641, iast (2.196 ms) : 2133, 2259 . : milestone, 2196, iast_GLOBAL (2.241 ms) : 2177, 2305 . : milestone, 2241, profiling (2.056 ms) : 2004, 2108 . : milestone, 2056, tracing (2.01 ms) : 1961, 2059 . : milestone, 2010, section candidate no_agent (1.473 ms) : 1461, 1484 . : milestone, 1473, appsec (3.709 ms) : 3489, 3929 . : milestone, 3709, iast (2.2 ms) : 2136, 2263 . : milestone, 2200, iast_GLOBAL (2.253 ms) : 2189, 2317 . : milestone, 2253, profiling (2.501 ms) : 2327, 2675 . : milestone, 2501, tracing (2.011 ms) : 1962, 2060 . : milestone, 2011,
|
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
...a-agent/agent-feature-flagging/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
| java { | ||
| sourceCompatibility = JavaVersion.VERSION_1_8 | ||
| targetCompatibility = JavaVersion.VERSION_1_8 | ||
| } |
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.
Not 100% sure, but with latest changes in build scripts we have this as default.
@bric3 Could you confirm on this?
...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/openfeature/src/main/java/datadog/trace/api/openfeature/DDEvaluator.java Show resolved Hide resolved
products/openfeature/src/main/java/datadog/trace/api/openfeature/DDEvaluator.java Show resolved Hide resolved
7e03de2 to 738f569 Compare 0388db6 to ca7c192 Compare a3c9e25 to bbf46e4 Compare f66a140 to 9cd5aeb Compare fdda03b to d926f7a Compare d926f7a to 6d05d9a Compare
What Does This Do
Implements the integration of the OpenFeature SDK within the Java tracer. This includes:
:dd-java-agent:agent-featureflagfor feature flag configuration and exposure submission through the EVP proxy.:products:openfeatureimplementing the OpenFeature Java provider:internal-apiexposing theFeatureFlagGatewayAPI between tracer internals and the feature flag provider.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