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

[Feature]: Name spawned threads #1949

Open
howardjohn opened this issue Jul 20, 2024 · 3 comments
Open

[Feature]: Name spawned threads #1949

howardjohn opened this issue Jul 20, 2024 · 3 comments
Assignees
Labels
A-common Area:common issues that not related to specific pillar enhancement New feature or request

Comments

@howardjohn
Copy link
Contributor

Related Problems?

No response

Describe the solution you'd like:

The TokioCurrentThread spawns threads without names. This makes debugging hard. For example:

thread '<unnamed>' panicked at /home/john/.rhack/tokio-1.37.0/src/runtime/time/entry.rs:557:9:
A Tokio 1.x context was found, but it is being shutdown.

is quite hard to trace back to otel.

I would like each thread spawned by this library to be named

Considered Alternatives

Use the multithreaded tokio runtime which does not spawn. This is currently causing deadlocks (#1395), so its not acceptable.

Additional Context

No response

@howardjohn howardjohn added enhancement New feature or request triage:todo Needs to be traiged. labels Jul 20, 2024
@howardjohn
Copy link
Contributor Author

BTW, I don't get A Tokio 1.x context was found, but it is being shutdown. after upgrading -- was just an example of a type of issue that would have been easier to debug if the thread was named.

@lalitb
Copy link
Member

lalitb commented Jul 20, 2024

@howardjohn If you'd like to contribute the fix, please feel free to proceed. We eventually plan to eliminate the dependency on the async runtime for batch processors. I'm currently working on this for logs (#1943), and a similar approach would be replicated to traces as well.

@howardjohn
Copy link
Contributor Author

BTW turns out the error was actually still happening, opened #1963. I missed it due to not setting the global trace provider after upgrading 🤦

@cijothomas cijothomas added A-common Area:common issues that not related to specific pillar and removed triage:todo Needs to be traiged. labels Jul 26, 2024
@cijothomas cijothomas self-assigned this Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-common Area:common issues that not related to specific pillar enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants