Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ForceFlush Implementation (#272)
### Description: Passed the force_flush function from MeteringProvider to the AwsSpanMetricProcessor to forceFlush remaining metrics on shutdown to the cwAgent/Collector. Compared to java/dotnet, looks like python already flushes all the metrics and traces on shutdown even without the force flush implementation. I'm adding it tho for consistency with other languages. ### Tesing: Increased the metricExporter interval and the BatchSpanProcessor delay to 10 minutes using: ``` OTEL_METRIC_EXPORT_INTERVAL=600000 \ OTEL_BSP_SCHEDULE_DELAY=600000 \ ``` With and without the force flush implementation, exiting the [sample app](https://github.com/aws-observability/aws-otel-python-instrumentation/blob/main/sample-applications/simple-client-server/server_automatic_s3client.py) flushed both the traces and the metrics to the collector. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
- Loading branch information