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

[Bug]: SimpleSpanProcessor might fail and error is ignored #1478

Open
dotansimha opened this issue Jan 16, 2024 · 2 comments
Open

[Bug]: SimpleSpanProcessor might fail and error is ignored #1478

dotansimha opened this issue Jan 16, 2024 · 2 comments
Labels
bug Something isn't working platform:wasm triage:todo Needs to be traiged.

Comments

@dotansimha
Copy link

What happened?

The SimpleSpanProcessor might fail silently on some runtime, for example, when thread::Builder::new() is called:

https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-sdk/src/trace/span_processor.rs#L106-L109

The error is ignored, and when Spans are reported, the self.message_sender.send call fails with a SendError (internally, the error is Disconnected).

I was trying to run this on a wasm32-unknown-unknown runtime, and it failed silently. Using the global error handler, I was able to get the Disconnected error, and then I figured out that it happens where there are not subscribers listening.

The

API Version

0.x

SDK Version

opentelemetry_sdk@0.21.2

What Exporters are you seeing the problem on?

N/A

Relevant log output

failed to spawn exporter thread: Error { kind: Unsupported, message: "operation not supported on
  this platform" }
@dotansimha dotansimha added bug Something isn't working triage:todo Needs to be traiged. labels Jan 16, 2024
@cijothomas
Copy link
Member

Would switching SimpleSpanProcessor to be similar to SimpleLogRecordProcessor be sufficient?

This was discussed here : #1409

@TommyCpp
Copy link
Contributor

I think particulate case is caused by we cannot create new thread in WASM as we did for tranditional platform. Switching to mutex based simple span processor. We can look into improving this when we start supporting wasm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform:wasm triage:todo Needs to be traiged.
Projects
None yet
Development

No branches or pull requests

3 participants