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

feat: Add addToTransactions to Attachment #1191

Merged
merged 2 commits into from
Jan 21, 2021

Conversation

philipphofmann
Copy link
Member

📜 Description

Add extra parameter addToTransaction to attachment, which specifies if the SDK adds
it to transactions or not. The default is false.

💡 Motivation and Context

Fixes GH-1185

💚 How did you test it?

Unit tests.

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify changes
  • All tests passing
  • No breaking changes

🔮 Next steps

Add extra parameter addToTransaction to attachment, which specifies if the SDK adds
it to transactions or not. The default is false.

Fixes GH-1185
@@ -377,6 +377,21 @@ public void captureSession(final @NotNull Session session, final @Nullable Objec
return sentryId;
}

private List<Attachment> filterForTransaction(List<Attachment> attachments) {
Copy link
Contributor

Choose a reason for hiding this comment

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

M: for nonprimitive types, lets always add final @NotNull or final @Nullable
a linter is on its way if we work together on https://github.com/getsentry/sentry-java/pull/1137/files#r548151954 :)

Copy link
Contributor

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

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

2 minor comments but other than that LGTM

@codecov-io
Copy link

Codecov Report

Merging #1191 (5ac3bb9) into main (9c6af50) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1191      +/-   ##
============================================
+ Coverage     74.70%   74.76%   +0.06%     
- Complexity     1662     1669       +7     
============================================
  Files           174      174              
  Lines          5851     5866      +15     
  Branches        572      574       +2     
============================================
+ Hits           4371     4386      +15     
  Misses         1216     1216              
  Partials        264      264              
Impacted Files Coverage Δ Complexity Δ
sentry/src/main/java/io/sentry/Attachment.java 100.00% <100.00%> (ø) 12.00 <5.00> (+3.00)
sentry/src/main/java/io/sentry/SentryClient.java 88.01% <100.00%> (+0.37%) 73.00 <4.00> (+4.00)

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 9c6af50...5ac3bb9. Read the comment docs.

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.

Add addToTransactions to Attachment
3 participants