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

Add feature for starting opentelemetry with tokio current thread runtime #28

Merged
merged 1 commit into from
Mar 17, 2022

Conversation

miterst
Copy link
Contributor

@miterst miterst commented Mar 11, 2022

Adds the rt-tokio-current-thread feature that activates the same feature on opentelemetry.

Using this feature resolves the problem of graceful app shutdown when using the actix runtime #24.

@miterst miterst marked this pull request as ready for review March 11, 2022 15:12
@miterst miterst requested review from wolf4ood and matteosister and removed request for wolf4ood March 11, 2022 15:12
Comment on lines +20 to +29
let runtime = {
#[cfg(feature = "rt-tokio-current-thread")]
{
opentelemetry::runtime::TokioCurrentThread
}
#[cfg(not(feature = "rt-tokio-current-thread"))]
{
opentelemetry::runtime::Tokio
}
};
Copy link
Member

Choose a reason for hiding this comment

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

never saw scopes used like this!

@matteosister matteosister merged commit 70a0c38 into master Mar 17, 2022
@matteosister matteosister deleted the feature-tokio-current-thread branch March 17, 2022 08:59
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