Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ForceFlush Implementation #272

Merged
merged 8 commits into from
Oct 10, 2024
Merged

Added ForceFlush Implementation #272

merged 8 commits into from
Oct 10, 2024

Conversation

AsakerMohd
Copy link
Contributor

@AsakerMohd AsakerMohd commented Oct 7, 2024

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 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.

@AsakerMohd AsakerMohd requested a review from a team as a code owner October 7, 2024 03:22
@AsakerMohd AsakerMohd merged commit 75af98a into main Oct 10, 2024
12 checks passed
@AsakerMohd AsakerMohd deleted the forceFlush branch October 10, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants