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

runtime: Fix opentelemetry gracefull shutdown #6664

Conversation

nicolaschotard
Copy link
Contributor

@nicolaschotard nicolaschotard commented Apr 3, 2024

Fixes: #6651

Why the changes in this PR are needed?

When running OPA with the distributed tracing option enabled, the OpenTelemetry trace exporter is not gracefully shut down when the server is stopped.

What are the changes in this PR?

This PR fixes that issues by moving the trace exporter shutdown in the gracefulShutdonw function.

Extra info

This bug has been introduced by a change in this commit

When running OPA with the distributed tracing option enabled,
the OpenTelemetry trace exporter is not gracefully shut down
when the server is stopped.

This PR fixes that issues by moving the trace exporter shutdown
in the gracefulShutdonw function.

Fixes: open-policy-agent#6651
Signed-off-by: Nicolas Chotard <nicolas.chotard@backmarket.com>
Copy link
Member

@ashutosh-narkar ashutosh-narkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @nicolaschotard . It would be great if we can add a test case to verify the behavior.

@ashutosh-narkar
Copy link
Member

@nicolaschotard can you please add a test case for this when you get a chance and we can get this in. Thanks.

@ashutosh-narkar
Copy link
Member

Closing this for now. @nicolaschotard this would be a good one to get in so feel free to re-open when you have a chance to write a test case. Thanks!

@nicolaschotard
Copy link
Contributor Author

Sorry @ashutosh-narkar I've put that aside for too long. But the good news is that it has been taken over 👍

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.

Failed to shutdown OpenTelemetry trace exporter gracefully.
2 participants