feat(target allocator): export self-telemetry via OTLP#5294
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5294 +/- ##
==========================================
+ Coverage 63.10% 63.30% +0.19%
==========================================
Files 215 216 +1
Lines 15291 15453 +162
==========================================
+ Hits 9650 9783 +133
- Misses 4961 4985 +24
- Partials 680 685 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
9f26d0b to
c4c6818
Compare
swiatekm
left a comment
There was a problem hiding this comment.
Conceptually, the changes look good and make sense to me. The main issue now is how do make them configurable for the user.
The end result I'd ultimately like to achieve is that the otel declarative config is the source of truth for all telemetry of the otel allocator, and the existing prometheus endpoint more of a legacy option for backwards compatibility.
There's three questions I'm trying to answer right now:
- Can we use the declarative config and customize the resulting sdk with the prometheus bridge and exporter?
- If so, is it better to embed the declarative config or keep a separate config file.
- If the above is not feasible, too complex, or we don't want to do it in this PR, then can we make our config compatible with the declarative spec?
|
Thanks! Moved all the telemetry setup out of On the three questions, having dug into 1. Can we use the declarative config and customize the resulting SDK with the Prometheus bridge + exporter? The OTLP exporter side is fully covered by otelconf - The Prometheus bridge is the catch. otelconf builds the readers internally and doesn't expose a way to attach a 2. Embed vs. separate config file? For the plain TA config I don't think a separate file is needed; embedding the declarative config in the existing config file is consistent with how the collector does it, and keeps everything in one place. 3. If (1) isn't clean, can we make our config compatible with the declarative spec? Yes, and I think that might be the sweet spot for this PR - adopt otelconf's config types as the schema for the The genuinely clean end state for declarative config is to stop registering the metrics on the Prometheus default registry and register them on the OTel SDK instead - then the bridge disappears and So my proposal - keep this PR as the working feature, and land it as-is with our current config and do the otelconf-schema swap next Let me know what you think! |
ab4d1da to
6a54017
Compare
TA binary side of the OTLP self-telemetry feature (no CRD changes):
- OTLP metric export from the TA config file (telemetry.metrics.otlp)
- Prometheus bridge so SD/Go/process metrics reach OTLP alongside /metrics
(SDK metrics on a dedicated registry to avoid double counting; /metrics = union)
- service.name resource, graceful meter-provider shutdown
- ${env:VAR} expansion in header/endpoint values; gRPC accepts URL or host:port
- config validation + unit and end-to-end export tests
Refs open-telemetry#5047
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
6a54017 to
1dfb2fb
Compare
|
@odubajDT sorry for the wait. I'm ok with keeping the mechanics of this PR as they are, and making the config compatible with the declarative config. It'd be nice to have a smoke test where we load a test yaml file into declarative config to verify that this works. |
TA binary side of the OTLP self-telemetry feature (no CRD changes):
(SDK metrics on a dedicated registry to avoid double counting; /metrics = union)
Based on #5068