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

Specify how to obtain a Ruby thread's id #2508

Merged

Conversation

fallwith
Copy link
Contributor

Update the span-general.md#source-code-attributes table for obtaining
thread ids and names across languages to explain how to obtain a
thread's id for Ruby.

Update the span-general.md#source-code-attributes table for obtaining
thread ids and names across languages to explain how to obtain a
thread's id for Ruby.
@fallwith fallwith requested review from a team as code owners April 23, 2022 04:37
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 23, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: fallwith / name: James Bunch (b3af1e8)

@Oberon00
Copy link
Member

Is there always only one unique Ruby object per logical Thread? Otherwise I think this may have confusing results.

@Oberon00 Oberon00 added area:semantic-conventions Related to semantic conventions spec:trace Related to the specification/trace directory labels Apr 25, 2022
@fallwith
Copy link
Contributor Author

Is there always only one unique Ruby object per logical Thread? Otherwise I think this may have confusing results.

Hi @Oberon00. The table row in question already had a value for the current thread's name. There is a name attribute available on the instance of the Thread class that is referenced by the table.

That instance of the Thread class is itself a unique object from Ruby's perspective and has a unique object id which is exposed via object_id.

@arminru
Copy link
Member

arminru commented Apr 25, 2022

@open-telemetry/ruby-maintainers @open-telemetry/ruby-approvers PTAL

Copy link
Contributor

@ahayworth ahayworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 Hello from @open-telemetry/ruby-approvers 👋

Since the semantic conventions explicitly require that thread.id be the Current "managed" thread ID (as opposed to OS thread ID). - this would be the right way to go about it. 👍

@reyang reyang merged commit 0d9dc0c into open-telemetry:main May 6, 2022
@fallwith fallwith deleted the note_how_obtain_a_ruby_thread_id branch June 3, 2022 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions spec:trace Related to the specification/trace directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants