feat: Attachments support#670
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #670 +/- ##
==========================================
+ Coverage 80.59% 80.62% +0.02%
==========================================
Files 43 44 +1
Lines 4407 4459 +52
==========================================
+ Hits 3552 3595 +43
- Misses 726 732 +6
- Partials 129 132 +3
☔ View full report in Codecov by Sentry. |
|
Nice, thank you @edigaryev! |
tonyo
left a comment
There was a problem hiding this comment.
Looking good, just one ask about test coverage 👍
| return nil | ||
| } | ||
|
|
||
| func encodeAttachment(enc *json.Encoder, b io.Writer, attachment *Attachment) error { |
There was a problem hiding this comment.
Please add a test in transport_test.go that tests this function.
There was a problem hiding this comment.
PTAL at 52caef2.
Not sure if testing encodeAttachment() directly makes sense in the presence of tests like TestEnvelopeFromErrorBody, which will already call that function under the hood if we set event.attachments to something.
There was a problem hiding this comment.
What you added is actually what I had in mind.
Fair point, but if we treat attachments as a separate "feature" of the SDK, having a separate test for that sounds like a good thing to me.
|
Thanks @edigaryev 🎉 |
|
The attachments support is now released as part of https://github.com/getsentry/sentry-go/releases/tag/v0.23.0 👍 |
This is similar to how
sentry-rustsupports attachments.Resolves #574.