-
Notifications
You must be signed in to change notification settings - Fork 501
Description
Is your feature request related to a problem?
I need to publish metrics on service shutdown, but PeriodicExportingMetricReader only allows me to publish on the configured interval.
Describe the solution you'd like
I'd like to have the metrics::MetricReader (returned by Provider::GetMeterProvider()) capable of running a round of callbacks across registered observables on demand.
Describe alternatives you've considered
I have tried MetricReader ->ForceFlush() and MetricReader->Shutdown() but those don't trigger the callbacks used to check my observables.
Additional context
I have published and example here with the exact scenario I'm trying to achieve: https://stackoverflow.com/questions/79742765/how-do-you-force-an-opentelemetry-measurement-event