We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Tracking upstream bug
davidB/tracing-opentelemetry-instrumentation-sdk#184 davidB/tracing-opentelemetry-instrumentation-sdk#185
I believe this to be a consequence of open-telemetry/opentelemetry-rust#1961 Using these versions: [dependencies] init-tracing-opentelemetry = { version = "0.19", features = [ "otlp", "tls", "tracing_subscriber_ext", ] } opentelemetry = "0.23" tokio = { version = "1.38", features = ["full"] } tracing = "0.1.40" This code works (I can get a trace): #[tracing::instrument] async fn hello() -> () { tracing::info!("Hello World!"); } #[tokio::main] async fn main() { match std::env::var("OTEL_SERVICE_NAME") { Ok(_) => (), Err(_) => std::env::set_var("OTEL_SERVICE_NAME", "hello"), }; init_tracing_opentelemetry::tracing_subscriber_ext::init_subscribers().expect("Tracing setup"); hello().await; opentelemetry::global::shutdown_tracer_provider(); } But when I change to these versions, the trace doesn't get emitted: [dependencies] init-tracing-opentelemetry = { version = "0.24", features = [ "otlp", "tls", "tracing_subscriber_ext", ] } opentelemetry = "0.27" tokio = { version = "1.38", features = ["full"] } tracing = "0.1.40" With this grossest of workarounds I can get the trace to show up again: @@ -12,4 +12,5 @@ async fn main() { init_tracing_opentelemetry::tracing_subscriber_ext::init_subscribers().expect("Tracing setup"); hello().await; opentelemetry::global::shutdown_tracer_provider(); + std::thread::sleep(std::time::Duration::from_millis(8000)); }
I believe this to be a consequence of open-telemetry/opentelemetry-rust#1961
Using these versions:
[dependencies] init-tracing-opentelemetry = { version = "0.19", features = [ "otlp", "tls", "tracing_subscriber_ext", ] } opentelemetry = "0.23" tokio = { version = "1.38", features = ["full"] } tracing = "0.1.40"
This code works (I can get a trace):
#[tracing::instrument] async fn hello() -> () { tracing::info!("Hello World!"); } #[tokio::main] async fn main() { match std::env::var("OTEL_SERVICE_NAME") { Ok(_) => (), Err(_) => std::env::set_var("OTEL_SERVICE_NAME", "hello"), }; init_tracing_opentelemetry::tracing_subscriber_ext::init_subscribers().expect("Tracing setup"); hello().await; opentelemetry::global::shutdown_tracer_provider(); }
But when I change to these versions, the trace doesn't get emitted:
[dependencies] init-tracing-opentelemetry = { version = "0.24", features = [ "otlp", "tls", "tracing_subscriber_ext", ] } opentelemetry = "0.27" tokio = { version = "1.38", features = ["full"] } tracing = "0.1.40"
With this grossest of workarounds I can get the trace to show up again:
@@ -12,4 +12,5 @@ async fn main() { init_tracing_opentelemetry::tracing_subscriber_ext::init_subscribers().expect("Tracing setup"); hello().await; opentelemetry::global::shutdown_tracer_provider(); + std::thread::sleep(std::time::Duration::from_millis(8000)); }
The text was updated successfully, but these errors were encountered:
(deps) Update init-tracing-opentelemetry
4226015
This commit brings in init-tracing-openetelemtry 0.24.1 which fixes a bug where spans might not get sent before program termination. Updating to this version may require some light code changes to ensure that the guard struct is being handled correctly to ensure trace flushing. Fixes equinix-labs#3 Related: - davidB/tracing-opentelemetry-instrumentation-sdk#184 - davidB/tracing-opentelemetry-instrumentation-sdk#185
Successfully merging a pull request may close this issue.
Tracking upstream bug
davidB/tracing-opentelemetry-instrumentation-sdk#184
davidB/tracing-opentelemetry-instrumentation-sdk#185
The text was updated successfully, but these errors were encountered: