Anyway to make meter.shutdown() invoke prometheusExporter.shutdown()? #1839
-
My understanding is that one prometheus exporter can be used to create more than one meterProviders which in turn can create more than one meters. My use case is a (I imagine common) 1 exporter to 1 provider to 1 meter scenario, furthermore the entire configuration is abstracted away and simply the meter is distributed via an in-house telemetry wrapper package. It would be great if meter.shutdown() could shut down the prometheus exporter because the prometheus server needs to shut down for a clean shutdown (e.g. in afterAll() in tests).
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The spec doesn't seems to suggest this, all details for 2) are inside. Generally i think it should be possible to have two different meter (one registered in the API and one manually managed) that use the same exporter, so having this behavior would cause both provider to fails. |
Beta Was this translation helpful? Give feedback.
The spec doesn't seems to suggest this, all details for 2) are inside.
For 1) i think you should export a
shutdown
method that know which components has been used and call theirshutdown
.Generally i think it should be possible to have two different meter (one registered in the API and one manually managed) that use the same exporter, so having this behavior would cause both provider to fails.