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

Log current thread id and name as span attribute #942

Closed
mateuszrzeszutek opened this issue Aug 11, 2020 · 7 comments · Fixed by #1093
Closed

Log current thread id and name as span attribute #942

mateuszrzeszutek opened this issue Aug 11, 2020 · 7 comments · Fixed by #1093
Labels
enhancement New feature or request

Comments

@mateuszrzeszutek
Copy link
Member

Currently we do not include any thread info (id, name) in spans produced by the agent. This issue is a suggestion to add two new attributes to each span just before it's started:

  • thread.id - equal to Thread.currentThread().getId()
  • thread.name - equal to Thread.currentThread().getName()

Those two attributes could be set in the BaseTracer#startSpan() method (or in a method used by/closely related to that one) so that they're uniformly added to all spans produced by the Java agent.

@iNikem iNikem added the enhancement New feature or request label Aug 11, 2020
@anuraaga
Copy link
Contributor

Should we start by filing an issue in the https://github.com/open-telemetry/opentelemetry-specification repo to add semantic conventions for these? We could have an extension of some sort for these but I don't think we should add anything by default that isn't in the spec.

It's interesting that these feel like Resource but since they're not constant to an app will need to be span attributes.

@trask
Copy link
Member

trask commented Aug 12, 2020

Should we start by filing an issue in the https://github.com/open-telemetry/opentelemetry-specification repo to add semantic conventions for these?

👍

@iNikem
Copy link
Contributor

iNikem commented Aug 12, 2020

We have a lot of attributes not mentioned in spec. Just saying :)

@trask
Copy link
Member

trask commented Aug 12, 2020

I don't think we have any generic attributes (not library specific ones) that aren't in the spec?

@iNikem
Copy link
Contributor

iNikem commented Aug 12, 2020

I don't think we have any generic attributes (not library specific ones) that aren't in the spec?

A, that's true. @mateuszrzeszutek, please follow the suggestion of @anuraaga from above

@mateuszrzeszutek
Copy link
Member Author

Done: open-telemetry/opentelemetry-specification#788

@trask
Copy link
Member

trask commented Aug 20, 2020

Labeled after-ga but we would definitely accept a PR for this any time prior to GA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants