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

Sleeping in a Spin app breaks traces #2487

Open
calebschoepp opened this issue May 3, 2024 · 2 comments
Open

Sleeping in a Spin app breaks traces #2487

calebschoepp opened this issue May 3, 2024 · 2 comments

Comments

@calebschoepp
Copy link
Contributor

Traces are not properly emitted when a Spin app sleeps.

The commit that introduced this regression is most likely here.

e.g.

use spin_sdk::http::{IntoResponse, Response};
use spin_sdk::http_component;
use spin_sdk::observe;

/// A simple Spin HTTP component.
#[http_component]
async fn hello_world(_req: http::Request<()>) -> anyhow::Result<impl IntoResponse> {
    std::thread::sleep(std::time::Duration::from_millis(500));
    Ok(Response::new(200, "Hello, world!"))
}
@lann
Copy link
Collaborator

lann commented May 3, 2024

(As discovered by @calebschoepp) Disabling metrics fixes this. Seems probable that this is an upstream tracing-opentelemetry or opentelemetry bug.

@calebschoepp
Copy link
Contributor Author

Potentially related to #2525

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

No branches or pull requests

2 participants