Skip to content

Make transaction a required argument of Span#1921

Merged
st0012 merged 3 commits intomasterfrom
refactor-#1890
Oct 25, 2022
Merged

Make transaction a required argument of Span#1921
st0012 merged 3 commits intomasterfrom
refactor-#1890

Conversation

@st0012
Copy link
Copy Markdown
Contributor

@st0012 st0012 commented Oct 21, 2022

According to the specification, a Span must has a Transaction, whether it's directly assigned to it or inherited from its parent Span.

So this commit enforces that by requiring the transaction: argument on Span's constructor.

Although it makes test setup a bit more complicated, it does make tests reflect our real-world expectation more accurately.

Although this PR changes the constructor of the Span and Transaction classes, they were never designed to be initialized directly by users. So this is not considered a breaking change

Closes #1890

@st0012 st0012 added this to the 6.0.0 milestone Oct 21, 2022
@st0012 st0012 self-assigned this Oct 21, 2022
According to the specification, a Span must has a Transaction, whether it's
directly assigned to it or inherited from its parent Span.

So this commit enforces that by requiring the `transaction:` argument on
Span's constructor.

Although it makes test setup a bit more complicated, it does make
tests reflect our real-world expectation more accurately.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 22, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.42%. Comparing base (7d97914) to head (9cfa53f).
⚠️ Report is 473 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1921      +/-   ##
==========================================
- Coverage   98.43%   98.42%   -0.01%     
==========================================
  Files         151      151              
  Lines        9273     9283      +10     
==========================================
+ Hits         9128     9137       +9     
- Misses        145      146       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@st0012 st0012 marked this pull request as ready for review October 22, 2022 10:22
@st0012 st0012 requested a review from sl0thentr0py October 22, 2022 10:22
@st0012 st0012 modified the milestones: 6.0.0, 5.6.0 Oct 23, 2022
@st0012 st0012 merged commit 29c444b into master Oct 25, 2022
@st0012 st0012 deleted the refactor-#1890 branch October 25, 2022 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make transaction required in Span constructor

3 participants