flagd
flagd copied to clipboard
refactor: removed hardcoded metric export interval and use otel default
This PR
- removed the 2 second hardcoded metric export interval
- use OTel default 60 second metric export interval
- the export interval can be overridden via the env var
OTEL_METRIC_EXPORT_INTERVAL
Related Issues
Fixes #1603
Notes
Removing the hardcoded value will allow users to override the default interval via environment variables. This
- https://pkg.go.dev/go.opentelemetry.io/otel/sdk/metric#WithInterval
- https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#periodic-exporting-metricreader
Deploy Preview for polite-licorice-3db33c canceled.
| Name | Link |
|---|---|
| Latest commit | 1be38d22e54a863b193e226cb0193eb181ee7947 |
| Latest deploy log | https://app.netlify.com/sites/polite-licorice-3db33c/deploys/681a5831a73842000814c68d |