Skip to content

Deep-copy spans#1148

Merged
st0012 merged 1 commit intomasterfrom
deep-copy-spans
Dec 16, 2020
Merged

Deep-copy spans#1148
st0012 merged 1 commit intomasterfrom
deep-copy-spans

Conversation

@st0012
Copy link
Copy Markdown
Contributor

@st0012 st0012 commented Dec 15, 2020

Scope's span should like other attributes be deep-copied instead of shared with reference, which can cause issues when used in a concurrent situation.

@st0012 st0012 added the bug fix label Dec 15, 2020
@st0012 st0012 added this to the 4.1.0 milestone Dec 15, 2020
@st0012 st0012 self-assigned this Dec 15, 2020
@st0012 st0012 mentioned this pull request Dec 15, 2020
5 tasks
@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 15, 2020

Codecov Report

Merging #1148 (4f44ea0) into master (f546b3a) will increase coverage by 0.43%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1148      +/-   ##
==========================================
+ Coverage   97.72%   98.16%   +0.43%     
==========================================
  Files         187       92      -95     
  Lines        7793     4022    -3771     
==========================================
- Hits         7616     3948    -3668     
+ Misses        177       74     -103     
Impacted Files Coverage Δ
sentry-ruby/lib/sentry/scope.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/span.rb 100.00% <100.00%> (ø)
sentry-ruby/spec/sentry/scope_spec.rb 100.00% <100.00%> (ø)
sentry-ruby/spec/sentry/span_spec.rb 100.00% <100.00%> (ø)
sentry-ruby/spec/sentry/transaction_spec.rb 100.00% <100.00%> (ø)
...integrations/rails/overrides/streaming_reporter.rb
...entry-raven/lib/raven/breadcrumbs/sentry_logger.rb
sentry-raven/lib/raven/interfaces/stack_trace.rb
sentry-raven/spec/raven/breadcrumbs_spec.rb
sentry-raven/lib/raven/interfaces/message.rb
... and 90 more

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 f546b3a...4f44ea0. Read the comment docs.

This is to avoid sharing mutations on spans between under concurrent
conditions.
@st0012 st0012 requested a review from HazAT December 15, 2020 16:12
@st0012 st0012 merged commit 165ed93 into master Dec 16, 2020
@st0012 st0012 deleted the deep-copy-spans branch December 16, 2020 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants