You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The distributor embeds the OTel receiver to receive traces. We currently very selectively export the metrics and convert them to Prometheus metrics. This means not all metrics are exposed and we might miss information.
Describe the solution you'd like
Export all metrics emitted by the receiver code and push them into our Prometheus registry.
Describe alternatives you've considered
We don't have to do this and keep the current situation.
Additional context
When we create the receiver we pass these TelemetrySettings:
We could instead create a MeterProvider that exports to our prometheus registry. The code would look something like this:
// create an OTel metrics -> Prometheus exporterexporterOpts:= []otelexporterprometheus.Option{
otelexporterprometheus.WithRegisterer(reg), // this is our main prometheus.Registry// optional, depends if you want otel_scope_info and otel_target_info metrics or nototelexporterprometheus.WithoutScopeInfo(),
otelexporterprometheus.WithoutTargetInfo(),
}
exporter, err:=otelexporterprometheus.New(exporterOpts...)
// handle err// create a MeterProvider with the exporter as readermeterProviderOpts:= []sdkmetric.Option{
sdkmetric.WithReader(exporter),
}
meterProvider:=sdkmetric.NewMeterProvider(meterProviderOpts...)
Then you can pass this meterProvider to TelemetrySettings.
The text was updated successfully, but these errors were encountered:
I took a quick stab at this and using the exporter changes the metric names. If we want to keep the same metrics we will need to setup a view to rename metrics I think. I'm not super familiar with how that works tbh.
As a first step I set up a test to check the metrics are being emitted correctly: #4477
(I probably won't look further into this unless it prevents us from upgrading OTel)
Is your feature request related to a problem? Please describe.
The distributor embeds the OTel receiver to receive traces. We currently very selectively export the metrics and convert them to Prometheus metrics. This means not all metrics are exposed and we might miss information.
Describe the solution you'd like
Export all metrics emitted by the receiver code and push them into our Prometheus registry.
Describe alternatives you've considered
We don't have to do this and keep the current situation.
Additional context
When we create the receiver we pass these
TelemetrySettings
:tempo/modules/distributor/receiver/shim.go
Lines 274 to 284 in f00ed6a
The custom
MeterProvider
is implemented here: https://github.com/grafana/tempo/blob/main/modules/distributor/receiver/metrics_provider.goWe could instead create a
MeterProvider
that exports to our prometheus registry. The code would look something like this:Then you can pass this
meterProvider
toTelemetrySettings
.The text was updated successfully, but these errors were encountered: