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

Review hub management implementation #1495

Open
st0012 opened this issue Jul 2, 2021 · 4 comments
Open

Review hub management implementation #1495

st0012 opened this issue Jul 2, 2021 · 4 comments
Assignees
Projects
Milestone

Comments

@st0012
Copy link
Collaborator

st0012 commented Jul 2, 2021

Related discussions:

@st0012 st0012 self-assigned this Jul 2, 2021
@st0012 st0012 added this to To do in 4.x via automation Jul 2, 2021
@st0012 st0012 changed the title Review state management implementation Review hub management implementation Jul 2, 2021
@singpolyma
Copy link

Found this because I was reviewing the code and surprised to see a thread local variable used. I would expect each Fiber, as a separate logical context and stack, to have a different hub, but I see this was done to solve some bug related to the way Rails uses Fibers? So maybe it needs to be an option...

@st0012 st0012 added this to the 5.0.0 milestone Aug 6, 2021
@st0012
Copy link
Collaborator Author

st0012 commented Aug 6, 2021

@singpolyma I'd like to give each fiber its own hub as well. But as long as users still use thread as a minimum concurrency unit instead of Fiber, it'll cause issues like #1374.

As for adding a fiber-based option, I don't plan to do that right now. But I'll revisit this issue when we start the implementation for version 5.0.

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@sl0thentr0py
Copy link
Member

we should revisit this when we implement the new hub-free scope system.
fwiw, opentelemtry itself uses a fiber local, if I understand correctly

https://github.com/open-telemetry/opentelemetry-ruby/blob/ff9a7d3af31ad83ed6e07445a9e1609bec53d779/api/lib/opentelemetry/context.rb#L126-L128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4.x
  
To do
Development

No branches or pull requests

4 participants