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

Introduce scope stack abstraction #1124

Merged
merged 10 commits into from
Jul 15, 2021
Merged

Introduce scope stack abstraction #1124

merged 10 commits into from
Jul 15, 2021

Conversation

Tyrrrz
Copy link
Contributor

@Tyrrrz Tyrrrz commented Jul 14, 2021

Closes #1106
Closes #628

Related to #221, #448, #505

Not entirely sure how to test this. Ideas @bruno-garcia?

@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2021

Codecov Report

Merging #1124 (248f929) into main (d7a96a3) will increase coverage by 0.01%.
The diff coverage is 88.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1124      +/-   ##
==========================================
+ Coverage   80.64%   80.65%   +0.01%     
==========================================
  Files         197      200       +3     
  Lines        6592     6612      +20     
  Branches     1455     1460       +5     
==========================================
+ Hits         5316     5333      +17     
- Misses        802      804       +2     
- Partials      474      475       +1     
Impacted Files Coverage Δ
....AspNet/Internal/HttpContextScopeStackContainer.cs 0.00% <0.00%> (ø)
src/Sentry/Internal/SentryScopeManager.cs 94.66% <90.90%> (-0.99%) ⬇️
src/Sentry.AspNet/SentryAspNetOptionsExtensions.cs 90.90% <100.00%> (+0.90%) ⬆️
src/Sentry/Internal/Hub.cs 62.37% <100.00%> (+0.76%) ⬆️
...ternal/ScopeStack/AsyncLocalScopeStackContainer.cs 100.00% <100.00%> (ø)
...y/Internal/ScopeStack/GlobalScopeStackContainer.cs 100.00% <100.00%> (ø)
src/Sentry/SentryOptions.cs 89.44% <100.00%> (+0.20%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d7a96a3...248f929. Read the comment docs.

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

I like where this is going!

@bruno-garcia
Copy link
Member

Not entirely sure how to test this. Ideas @bruno-garcia?

I think the direction you're going for a test for each approach is a good one. Let me take another look once it's out of draft to propose some integration/unit tests

@Tyrrrz
Copy link
Contributor Author

Tyrrrz commented Jul 15, 2021

@bruno-garcia what do you think about the general implementation by the way? I know you said there are a lot of potential edge-cases/hidden issues, so I'm somewhat skeptical about my solution given how easy it was to implement 😅

It could benefit to put some more responsibility inside IScopeStackContainer, but I decided to go with the easiest approach for now.

@Tyrrrz Tyrrrz marked this pull request as ready for review July 15, 2021 20:07
Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

Thanks!

@bruno-garcia bruno-garcia merged commit 28ec35d into main Jul 15, 2021
@bruno-garcia bruno-garcia deleted the hub-revolution branch July 15, 2021 23:35
@bruno-garcia
Copy link
Member

We need to ship this and add some docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants