-
Notifications
You must be signed in to change notification settings - Fork 894
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
Add semantic conventions for thread.name and thread.id span attributes #789
Add semantic conventions for thread.name and thread.id span attributes #789
Conversation
Correct `thread.id` description Co-authored-by: Christian Neumüller <[email protected]>
Please sign the CLA |
So this is for threads that might not necessarily be 1:1 with OS threads? I'm wondering if there is a term that could be used that isn't "thread" or "process" so this can be used for (without being confusing) for both. Specifically thinking of the need to add Erlang process pid's (and registered names) as attributes. Though Erlang process id's are made up of 3 integers.. so this might not work any way. |
Also bear in mind that with Java there will soon be Fibers as well. |
Define "thread" more precisely as "thread that started a span"
As @Oberon00 mentioned here, info about the managed thread seems to be the most interesting when you want to debug what exactly happened in you application.
Most likely we'll want to switch to |
@mateuszrzeszutek if this is meant to be the thread that started the span then it shouldn't be |
I was under the impression that we might want to store information about a To sum up: in Java |
Co-authored-by: Tigran Najaryan <[email protected]>
Yes, I think if this semantic convention is merged that it should not include things like the Fiber id. For Fibers and other user/language space forms of threads/processes (goroutine, Erlang process, etc) there should be a separate convention. I don't know if there should attempt to be a shared convention or if each should just do their own, like for Erlang, |
Is it worth adding the word OS, as in OS thread to this spec? I feel as any ID that's idiomatic to the user's program, OS or fiber or otherwise, could be ok here so maybe we've overdefined by adding implementation details. But if we want to corner in on OS threads specifically in this spec we could be more direct. |
True. +1 to naming it |
I would also prefer using just thread and not process.thread, as I said above. I do think it's mostly a matter of taste though. |
I don't have a strong preference for either of these, both |
@iNikem na, I get that there shouldn't technically be a rule against it but I still think |
When I suggested I was wrong, I now think this is not a valid reason for choosing a namespace. The fact that an entity is located within another entity is not a reason for forming nested namespaces. That is not the purpose of namespaces. The purpose of a namespace is to avoid name clashes. You place something in a namespace if that same name can exist elsewhere but have a different meaning. My understanding is that threads as we define them can only exist inside processes, there are no other threads that we need to differentiate from process threads. This means there is no need to place threads inside the process namespace. I retract my earlier suggestion to use the "process" namespace for threads. |
cb4f03c
to
e5bcb10
Compare
Okay, I removed my last commit: that leaves us with |
Merging as this issue was fully resolved and the changes are relatively trivial. @yurishkuro please do a follow up if you think there's any pending concern still. |
This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: open-telemetry#789 (comment) open-telemetry#882 (comment) open-telemetry#1194 (comment)
This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: #789 (comment) #882 (comment) #1194 (comment)
…etry#1197) This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: open-telemetry/opentelemetry-specification#789 (comment) open-telemetry/opentelemetry-specification#882 (comment) open-telemetry/opentelemetry-specification#1194 (comment)
…etry#1197) This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: open-telemetry/opentelemetry-specification#789 (comment) open-telemetry/opentelemetry-specification#882 (comment) open-telemetry/opentelemetry-specification#1194 (comment)
…etry#1197) This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: open-telemetry/opentelemetry-specification#789 (comment) open-telemetry/opentelemetry-specification#882 (comment) open-telemetry/opentelemetry-specification#1194 (comment)
…etry#1197) This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: open-telemetry/opentelemetry-specification#789 (comment) open-telemetry/opentelemetry-specification#882 (comment) open-telemetry/opentelemetry-specification#1194 (comment)
…etry#1197) This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: open-telemetry/opentelemetry-specification#789 (comment) open-telemetry/opentelemetry-specification#882 (comment) open-telemetry/opentelemetry-specification#1194 (comment)
…etry#1197) This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: open-telemetry/opentelemetry-specification#789 (comment) open-telemetry/opentelemetry-specification#882 (comment) open-telemetry/opentelemetry-specification#1194 (comment)
This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: open-telemetry/opentelemetry-specification#789 (comment) open-telemetry/opentelemetry-specification#882 (comment) open-telemetry/opentelemetry-specification#1194 (comment)
This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: open-telemetry/opentelemetry-specification#789 (comment) open-telemetry/opentelemetry-specification#882 (comment) open-telemetry/opentelemetry-specification#1194 (comment)
…etry#1197) This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: open-telemetry/opentelemetry-specification#789 (comment) open-telemetry/opentelemetry-specification#882 (comment) open-telemetry/opentelemetry-specification#1194 (comment)
…etry#1197) This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: open-telemetry/opentelemetry-specification#789 (comment) open-telemetry/opentelemetry-specification#882 (comment) open-telemetry/opentelemetry-specification#1194 (comment)
…etry#1197) This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: open-telemetry/opentelemetry-specification#789 (comment) open-telemetry/opentelemetry-specification#882 (comment) open-telemetry/opentelemetry-specification#1194 (comment)
…etry#1197) This topic has come up at least 3 times now. I believe a clarification is warranted. The clarification is aligned with previous recommendations: open-telemetry/opentelemetry-specification#789 (comment) open-telemetry/opentelemetry-specification#882 (comment) open-telemetry/opentelemetry-specification#1194 (comment)
|
||
| Launguage or platform | `thread.id` | `thread.name` | | ||
|-----------------------|----------------------------------------|------------------------------------| | ||
| JVM | `Thread.currentThread().getId()` | `Thread.currentThread().getName()` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thread.currentThread().getId()
is deprecated since java 19. There is a Thread.currentThread().threadId()
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @johantiden! this page has been moved to another repo: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attributes.md#general-thread-attributes
can you open an issue (or PR) over there? thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened an issue in open-telemetry/semantic-conventions#1375 so we don't miss it as this PR here was closed 4 years ago.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pointers! I just called it as I saw it. I came to this commit from the original pull request.
Fixes #788
Changes
Added two new span attributes responsible for storing current thread information:
thread.name
andthread.id
Related issues: open-telemetry/opentelemetry-java-instrumentation#942