Adding global config to enable otlp_exporter - #2292
Conversation
| for k, v := range enabledExperiments { | ||
| newExperiments[k] = v | ||
| } | ||
| if uc.Global.GetOtlpExporter() { |
There was a problem hiding this comment.
the global config knob should replace the experimental flag.
We should remove any references to the otlp_exporter experimental flag in the confgenerator. Instead, we should rely on verifying whether the global configuration OtlpExporter is set.
There was a problem hiding this comment.
Decoupled the new config knob with any experiment relation. IT should now only use the config
Remove all references to the `otlp_exporter` experimental flag in the confgenerator. Instead, rely on verifying whether the global configuration `OtlpExporter` is set using a dedicated context helper. Also, update tests to use the new ContextWithOtlpExporter helper. TAG=agy CONV=60663306-7f95-4fa8-8baa-65483fc3cf16
| newExperiments[k] = v | ||
| } | ||
| ctx = experiments.ContextWithExperiments(ctx, newExperiments) | ||
| if uc.Global.GetOtlpExporter() || OtlpExporterFromContext(ctx) { |
There was a problem hiding this comment.
I think if should only check for uc.Global.GetOtlpExporter() here.
|
Can we implement this without propagating the Here is a my prototype: https://screenshot.googleplex.com/AamNBzffYZrN3Ln, i.e: After we generate all the OTel pipelines, but before the actual OTel YAML config is generated (link), we replace the Google Cloud exporter with the OTLP exporter." |
| if _, ok := pipeline.ExporterTypes["logs"]; ok { | ||
| pipeline.ExporterTypes["logs"] = otel.OTLP_Logs | ||
| if _, ok := pipeline.ExporterTypes["logs"]; ok { | ||
| if pipeline.ExporterTypes["logs"] == otel.Logging { |
There was a problem hiding this comment.
i dont think this if clause is necessary here. All Otel logging pipielines use otel.Logging as the exporter.
|
Please make sure all integration tests pass, except for flakes. |
a4825a5 to
0cd6255
Compare
…aces (#2292) * Implement global.otlp_exporter configuration knob in ops-agent * Route prometheus and traces to OTLP exporter when enabled * Ensure prometheus metrics exported via OTLP have prometheus.googleapis.com prefix * Add healthcheck support for OTLP traces and metrics * Update golden files and integration tests
a10909b to
bba71e5
Compare
Description
This PR removed the environment variables mechanism to enable the OTLP exporters, and change it to a global config in the config.yaml
otlp_exporter: true
Related issue
b/513235176
How has this been tested?
Teseted in a VM with the new feature
Checklist: