[feature request] GenevaExporter to support runtime configurations changes #2576
Labels
comp:exporter.geneva
Things related to OpenTelemetry.Exporter.Geneva
enhancement
New feature or request
Component
OpenTelemetry.Exporter.Geneva
Is your feature request related to a problem?
This issue is mainly concerned about logging.
Configuration and initialization of Geneva Exporter does not support changing configurations in the runtime. Following API does not support eg. providing
IOptionsMonitor
or other OnChange events to the Exporter.Consequently, services using Geneva logging are unable to incorporate reloading or updating configurations in the service's runtime, meaning after DI container build and server start. Options are saved into the exporter at the initialization. There are particular use cases for to change connection string or TableMapping in the runtime, eg. migration between different namespaces/accounts/tables or runtime switches of table targets due to performance reasons such as problems with exceeding table capacity.
Current behavior requires services to restart in order to load new configurations, which may be undesirable.
What is the expected behavior?
On Geneva Exporter initialization, Exporter should hook up to OnChange events in order to change options used by Exporter to export logs in the service's runtime.
I believe 2 scenarios should be supported
Which alternative solutions or features have you considered?
We could lazy load Exporter or the options or create a wrapper around the exporter, by providing separated
Logger
, that would rebuild exporter if configs change. Rebuilding Exporter related objects seems quite heavy and it needs some kind of flushing mechanism to prevent logs loss during rebuild.Additional context
No response
The text was updated successfully, but these errors were encountered: