- 
                Notifications
    
You must be signed in to change notification settings  - Fork 315
 
Add Otel Metrics configuration keys #9868
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: 28394a2 | 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 53 metrics, 12 unstable metrics. Startup time reports for insecure-bankgantt
    title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~28394a2300, baseline=1.55.0-SNAPSHOT~364bb8b68f
    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.028 s) : 0, 1027825
Total [baseline] (8.695 s) : 0, 8695113
Agent [candidate] (1.03 s) : 0, 1029951
Total [candidate] (8.672 s) : 0, 8671640
section iast
Agent [baseline] (1.167 s) : 0, 1167196
Total [baseline] (9.347 s) : 0, 9346739
Agent [candidate] (1.162 s) : 0, 1161826
Total [candidate] (9.382 s) : 0, 9381870
    
 
 
 
 gantt
    title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~28394a2300, baseline=1.55.0-SNAPSHOT~364bb8b68f
    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.468 ms) : 0, 1468
crashtracking [candidate] (1.46 ms) : 0, 1460
BytebuddyAgent [baseline] (700.773 ms) : 0, 700773
BytebuddyAgent [candidate] (702.392 ms) : 0, 702392
GlobalTracer [baseline] (244.211 ms) : 0, 244211
GlobalTracer [candidate] (244.583 ms) : 0, 244583
AppSec [baseline] (32.382 ms) : 0, 32382
AppSec [candidate] (32.361 ms) : 0, 32361
Debugger [baseline] (6.389 ms) : 0, 6389
Debugger [candidate] (6.376 ms) : 0, 6376
Remote Config [baseline] (673.828 µs) : 0, 674
Remote Config [candidate] (695.429 µs) : 0, 695
Telemetry [baseline] (14.402 ms) : 0, 14402
Telemetry [candidate] (15.734 ms) : 0, 15734
Flare Poller [baseline] (6.441 ms) : 0, 6441
Flare Poller [candidate] (5.21 ms) : 0, 5210
section iast
crashtracking [baseline] (1.478 ms) : 0, 1478
crashtracking [candidate] (1.462 ms) : 0, 1462
BytebuddyAgent [baseline] (829.233 ms) : 0, 829233
BytebuddyAgent [candidate] (824.63 ms) : 0, 824630
GlobalTracer [baseline] (234.023 ms) : 0, 234023
GlobalTracer [candidate] (233.765 ms) : 0, 233765
IAST [baseline] (32.07 ms) : 0, 32070
IAST [candidate] (30.888 ms) : 0, 30888
AppSec [baseline] (29.691 ms) : 0, 29691
AppSec [candidate] (30.626 ms) : 0, 30626
Debugger [baseline] (6.111 ms) : 0, 6111
Debugger [candidate] (6.118 ms) : 0, 6118
Remote Config [baseline] (606.504 µs) : 0, 607
Remote Config [candidate] (597.433 µs) : 0, 597
Telemetry [baseline] (8.461 ms) : 0, 8461
Telemetry [candidate] (8.344 ms) : 0, 8344
Flare Poller [baseline] (4.124 ms) : 0, 4124
Flare Poller [candidate] (4.15 ms) : 0, 4150
    Startup time reports for petclinicgantt
    title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~28394a2300, baseline=1.55.0-SNAPSHOT~364bb8b68f
    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.033 s) : 0, 1032992
Total [baseline] (10.859 s) : 0, 10858734
Agent [candidate] (1.027 s) : 0, 1027235
Total [candidate] (10.9 s) : 0, 10900395
section appsec
Agent [baseline] (1.208 s) : 0, 1208399
Total [baseline] (10.961 s) : 0, 10960515
Agent [candidate] (1.202 s) : 0, 1202413
Total [candidate] (11.02 s) : 0, 11020271
section iast
Agent [baseline] (1.161 s) : 0, 1160935
Total [baseline] (11.212 s) : 0, 11211814
Agent [candidate] (1.169 s) : 0, 1168895
Total [candidate] (11.153 s) : 0, 11153434
section profiling
Agent [baseline] (1.179 s) : 0, 1178639
Total [baseline] (10.913 s) : 0, 10912736
Agent [candidate] (1.181 s) : 0, 1181035
Total [candidate] (10.974 s) : 0, 10973588
    
 
 
 
 gantt
    title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~28394a2300, baseline=1.55.0-SNAPSHOT~364bb8b68f
    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.464 ms) : 0, 1464
crashtracking [candidate] (1.466 ms) : 0, 1466
BytebuddyAgent [baseline] (702.751 ms) : 0, 702751
BytebuddyAgent [candidate] (700.231 ms) : 0, 700231
GlobalTracer [baseline] (246.278 ms) : 0, 246278
GlobalTracer [candidate] (244.116 ms) : 0, 244116
AppSec [baseline] (32.879 ms) : 0, 32879
AppSec [candidate] (32.294 ms) : 0, 32294
Debugger [baseline] (6.558 ms) : 0, 6558
Debugger [candidate] (6.368 ms) : 0, 6368
Remote Config [baseline] (688.241 µs) : 0, 688
Remote Config [candidate] (670.096 µs) : 0, 670
Telemetry [baseline] (13.188 ms) : 0, 13188
Telemetry [candidate] (16.016 ms) : 0, 16016
Flare Poller [baseline] (8.048 ms) : 0, 8048
Flare Poller [candidate] (5.05 ms) : 0, 5050
section appsec
crashtracking [baseline] (1.471 ms) : 0, 1471
crashtracking [candidate] (1.467 ms) : 0, 1467
BytebuddyAgent [baseline] (729.904 ms) : 0, 729904
BytebuddyAgent [candidate] (725.645 ms) : 0, 725645
GlobalTracer [baseline] (237.03 ms) : 0, 237030
GlobalTracer [candidate] (236.298 ms) : 0, 236298
IAST [baseline] (25.357 ms) : 0, 25357
IAST [candidate] (24.955 ms) : 0, 24955
AppSec [baseline] (174.522 ms) : 0, 174522
AppSec [candidate] (174.097 ms) : 0, 174097
Debugger [baseline] (5.898 ms) : 0, 5898
Debugger [candidate] (5.928 ms) : 0, 5928
Remote Config [baseline] (632.333 µs) : 0, 632
Remote Config [candidate] (618.862 µs) : 0, 619
Telemetry [baseline] (8.428 ms) : 0, 8428
Telemetry [candidate] (8.421 ms) : 0, 8421
Flare Poller [baseline] (3.883 ms) : 0, 3883
Flare Poller [candidate] (3.874 ms) : 0, 3874
section iast
crashtracking [baseline] (1.482 ms) : 0, 1482
crashtracking [candidate] (1.491 ms) : 0, 1491
BytebuddyAgent [baseline] (823.716 ms) : 0, 823716
BytebuddyAgent [candidate] (830.886 ms) : 0, 830886
GlobalTracer [baseline] (233.781 ms) : 0, 233781
GlobalTracer [candidate] (233.759 ms) : 0, 233759
IAST [baseline] (34.182 ms) : 0, 34182
IAST [candidate] (30.963 ms) : 0, 30963
AppSec [baseline] (27.157 ms) : 0, 27157
AppSec [candidate] (30.807 ms) : 0, 30807
Debugger [baseline] (6.148 ms) : 0, 6148
Debugger [candidate] (6.154 ms) : 0, 6154
Remote Config [baseline] (598.797 µs) : 0, 599
Remote Config [candidate] (593.874 µs) : 0, 594
Telemetry [baseline] (8.437 ms) : 0, 8437
Telemetry [candidate] (8.472 ms) : 0, 8472
Flare Poller [baseline] (4.115 ms) : 0, 4115
Flare Poller [candidate] (4.227 ms) : 0, 4227
section profiling
crashtracking [baseline] (1.462 ms) : 0, 1462
crashtracking [candidate] (1.452 ms) : 0, 1452
BytebuddyAgent [baseline] (730.135 ms) : 0, 730135
BytebuddyAgent [candidate] (731.25 ms) : 0, 731250
GlobalTracer [baseline] (221.12 ms) : 0, 221120
GlobalTracer [candidate] (221.19 ms) : 0, 221190
AppSec [baseline] (33.309 ms) : 0, 33309
AppSec [candidate] (33.47 ms) : 0, 33470
Debugger [baseline] (13.0 ms) : 0, 13000
Debugger [candidate] (11.508 ms) : 0, 11508
Remote Config [baseline] (725.735 µs) : 0, 726
Remote Config [candidate] (713.646 µs) : 0, 714
Telemetry [baseline] (9.045 ms) : 0, 9045
Telemetry [candidate] (10.693 ms) : 0, 10693
Flare Poller [baseline] (4.195 ms) : 0, 4195
Flare Poller [candidate] (4.175 ms) : 0, 4175
ProfilingAgent [baseline] (109.92 ms) : 0, 109920
ProfilingAgent [candidate] (110.303 ms) : 0, 110303
Profiling [baseline] (110.567 ms) : 0, 110567
Profiling [candidate] (110.902 ms) : 0, 110902
    LoadParameters
 See matching parameters
 SummaryFound 6 performance improvements and 0 performance regressions! Performance is the same for 6 metrics, 12 unstable metrics. 
 Request duration reports for insecure-bankgantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~28394a2300, baseline=1.55.0-SNAPSHOT~364bb8b68f
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.228 ms) : 1216, 1240
.   : milestone, 1228,
iast (3.152 ms) : 3115, 3189
.   : milestone, 3152,
iast_FULL (5.846 ms) : 5788, 5905
.   : milestone, 5846,
iast_GLOBAL (3.489 ms) : 3438, 3541
.   : milestone, 3489,
profiling (2.097 ms) : 2078, 2116
.   : milestone, 2097,
tracing (1.819 ms) : 1802, 1836
.   : milestone, 1819,
section candidate
no_agent (1.228 ms) : 1216, 1241
.   : milestone, 1228,
iast (3.149 ms) : 3110, 3188
.   : milestone, 3149,
iast_FULL (5.573 ms) : 5518, 5628
.   : milestone, 5573,
iast_GLOBAL (3.592 ms) : 3531, 3653
.   : milestone, 3592,
profiling (1.899 ms) : 1882, 1915
.   : milestone, 1899,
tracing (1.75 ms) : 1736, 1765
.   : milestone, 1750,
    
 
 
 
 Request duration reports for petclinicgantt
    title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~28394a2300, baseline=1.55.0-SNAPSHOT~364bb8b68f
    dateFormat X
    axisFormat %s
section baseline
no_agent (19.351 ms) : 19160, 19543
.   : milestone, 19351,
appsec (19.774 ms) : 19568, 19979
.   : milestone, 19774,
code_origins (19.527 ms) : 19332, 19721
.   : milestone, 19527,
iast (19.633 ms) : 19434, 19833
.   : milestone, 19633,
profiling (20.313 ms) : 20106, 20520
.   : milestone, 20313,
tracing (18.401 ms) : 18217, 18585
.   : milestone, 18401,
section candidate
no_agent (19.245 ms) : 19048, 19443
.   : milestone, 19245,
appsec (18.695 ms) : 18507, 18883
.   : milestone, 18695,
code_origins (17.801 ms) : 17622, 17980
.   : milestone, 17801,
iast (18.756 ms) : 18567, 18945
.   : milestone, 18756,
profiling (20.736 ms) : 20529, 20944
.   : milestone, 20736,
tracing (18.758 ms) : 18567, 18948
.   : milestone, 18758,
    
 
 
 
 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 biojavagantt
    title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~28394a2300, baseline=1.55.0-SNAPSHOT~364bb8b68f
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.015 s) : 15015000, 15015000
.   : milestone, 15015000,
appsec (15.072 s) : 15072000, 15072000
.   : milestone, 15072000,
iast (18.567 s) : 18567000, 18567000
.   : milestone, 18567000,
iast_GLOBAL (18.083 s) : 18083000, 18083000
.   : milestone, 18083000,
profiling (16.144 s) : 16144000, 16144000
.   : milestone, 16144000,
tracing (15.162 s) : 15162000, 15162000
.   : milestone, 15162000,
section candidate
no_agent (15.593 s) : 15593000, 15593000
.   : milestone, 15593000,
appsec (15.311 s) : 15311000, 15311000
.   : milestone, 15311000,
iast (18.8 s) : 18800000, 18800000
.   : milestone, 18800000,
iast_GLOBAL (17.756 s) : 17756000, 17756000
.   : milestone, 17756000,
profiling (15.557 s) : 15557000, 15557000
.   : milestone, 15557000,
tracing (15.145 s) : 15145000, 15145000
.   : milestone, 15145000,
    
 
 
 
 Execution time for tomcatgantt
    title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~28394a2300, baseline=1.55.0-SNAPSHOT~364bb8b68f
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.478 ms) : 1466, 1489
.   : milestone, 1478,
appsec (2.463 ms) : 2412, 2514
.   : milestone, 2463,
iast (2.218 ms) : 2154, 2282
.   : milestone, 2218,
iast_GLOBAL (2.259 ms) : 2196, 2323
.   : milestone, 2259,
profiling (2.052 ms) : 2000, 2103
.   : milestone, 2052,
tracing (2.029 ms) : 1980, 2078
.   : milestone, 2029,
section candidate
no_agent (1.481 ms) : 1469, 1492
.   : milestone, 1481,
appsec (3.733 ms) : 3514, 3951
.   : milestone, 3733,
iast (2.216 ms) : 2152, 2280
.   : milestone, 2216,
iast_GLOBAL (2.25 ms) : 2186, 2314
.   : milestone, 2250,
profiling (2.073 ms) : 2020, 2126
.   : milestone, 2073,
tracing (2.035 ms) : 1985, 2084
.   : milestone, 2035,
    
 
 
 
  | 
    
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.
Didn't have time to review all test files, but I have a general concern about where we should handle OTel configurations. We already have OTelEnvironmentConfigSource, which is effectively sets Datadog Configs as aliases for OTel Configs when DD_TRACE_OTEL_ENABLED=true.
IMO we should handle all OTel configs in one place to have one source of truth, and to me it makes sense to isolate them in OTelEnvironmentConfigSource. WDYT?
        
          
                dd-trace-api/src/main/java/datadog/trace/api/ConfigDefaults.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                dd-trace-api/src/main/java/datadog/trace/api/ConfigDefaults.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                dd-trace-api/src/main/java/datadog/trace/api/ConfigDefaults.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | runtimeMetricsEnabled = configProvider.getBoolean(RUNTIME_METRICS_ENABLED, true); | ||
| metricsOtelEnabled = | ||
| configProvider.getBoolean(METRICS_OTEL_ENABLED, DEFAULT_METRICS_OTEL_ENABLED); | ||
| otelResourceAttributes = configProvider.getMergedMap(OTEL_RESOURCE_ATTRIBUTES, '='); | 
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.
This is already queried in OtelEnvironmentConfigSource, and it appears that the existing way of handling of this config is slightly more specific than what is happening here.
Do we have a consensus of how we would like to handle this config?
This also brings up a bigger question of whether or not we want to reclassify what OtelEnvironmentConfigSource does. It really is not its own config source, but rather prioritizing OTEL configs instead of their DD equivalents when DD_TRACE_OTEL_ENABLED = true. Should we have all OTEL configs handled in the OtelEnvironmentConfigSource, or should we migrate all of the configs handled there to be handled in Config.java?
IMO, it makes sense to handle all OTel Configs in OtelEnvironmentConfigSource to separate them from regular DD config handling, and to keep the handling of OTel Configs all in one place.
Co-authored-by: mhlidd <matthew.li@datadoghq.com>
Co-authored-by: mhlidd <matthew.li@datadoghq.com>
Co-authored-by: mhlidd <matthew.li@datadoghq.com>
Co-authored-by: mhlidd <matthew.li@datadoghq.com>
          
 Hi @mhlidd,  | 
    
| 
           @cecile75 Yes you're right about the  I do think that the  
 Renaming to   | 
    
| 
           @mhlidd Looking more into this as there are shared configuration keys between otel metric and otel traces that need remapping: you have mentioned   | 
    
| 
           Recent changes: 
  | 
    
What Does This Do
Add Otel Metrics configuration keys. They are not linked to anything yet.
Motivation
OpenTelemetry Metrics API support
Additional Notes
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: APMAPI-1671