-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
Set SDK version on Transactions. #1314
Conversation
val transaction = SentryTransaction("name", "op") | ||
val sdkVersion = SdkVersion("transaction.sdk.name", "version") | ||
transaction.sdk = sdkVersion | ||
transaction.environment = "transactionEnvironment" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transaction.environment = "transactionEnvironment" |
fixture.sentryOptions.sdkVersion = SdkVersion("sdk.name", "version") | ||
val sut = fixture.getSut() | ||
val transaction = SentryTransaction("name", "op") | ||
sut.captureTransaction(transaction) | ||
assertEquals(fixture.sentryOptions.sdkVersion, transaction.sdk) | ||
} | ||
|
||
@Test | ||
fun `when transaction has SDK version set, and the SDK version is set on options, options values are not applied to transactions`() { | ||
fixture.sentryOptions.sdkVersion = SdkVersion("sdk.name", "version") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we set SdkVersion
already in the creation of sentryOptions
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I'll refactor this whole test class in subsequent PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a comment about testing, other than that, LGTM
Codecov Report
@@ Coverage Diff @@
## main #1314 +/- ##
============================================
+ Coverage 75.65% 75.85% +0.19%
- Complexity 1786 1798 +12
============================================
Files 183 183
Lines 6207 6229 +22
Branches 622 623 +1
============================================
+ Hits 4696 4725 +29
+ Misses 1232 1226 -6
+ Partials 279 278 -1
Continue to review full report at Codecov.
|
📜 Description
Set SDK version on Transactions.
💡 Motivation and Context
Fixes #1307
💚 How did you test it?
Unit tests.
📝 Checklist