Charles-Edouard Brétéché
Charles-Edouard Brétéché
Where is `exporter.ServeHTTP` gone ? How are we supposed to serve metrics to prometheus now ? Am I missing something ?
@fatsheep9146 thanks, I did the same as in https://github.com/open-telemetry/opentelemetry-go/tree/main/example/prometheus. I now see crazy metrics like `kyverno_policy_changes_total_total_total_total_total_total_total_total_total_total`. Any idea what's going on here ?
Basically the same as in the example, my metric is created like this: ``` m.policyChangesMetric, err = meter.SyncInt64().Counter("kyverno_policy_changes_total", instrument.WithDescription("can be used to track all the changes associated with the Kyverno...
The code initialising otel is here https://github.com/eddycharly/kyverno/blob/a8a496c8b231e1587797dc4af464ce747a524384/pkg/metrics/metrics.go#L169-L203
@fatsheep9146 the suggested changes didn't fix the issue, I still observe metrics like this: ``` # TYPE kyverno_policy_changes_total_total_total_total_total_total_total_total_total_total_total_total_total counter kyverno_policy_changes_total_total_total_total_total_total_total_total_total_total_total_total_total{policy_background_mode="true",policy_change_type="deleted",policy_name="tasks-no-extractor",policy_namespace="-",policy_type="cluster",policy_validation_mode="enforce"} 1 ```
@fatsheep9146 it looks like it's fixed on `main` but not yet in `v1.11.1`
Offending code (should have been out of the for loop) https://github.com/open-telemetry/opentelemetry-go/blob/2fe8861a24e20088c065b116089862caf9e3cd8b/exporters/prometheus/exporter.go#L207-L210
Any idea when the next release containing the fix might come out ?
Thank you so much 🙏
@Vishal-Chdhry are you working on this or shall we close it ?