-
-
Notifications
You must be signed in to change notification settings - Fork 432
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 basic support for attachments #1082
Conversation
Scope.clear is not covered by tests. This is fixed now by adding a test for it.
sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/MainActivity.java
Outdated
Show resolved
Hide resolved
sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/MainActivity.java
Outdated
Show resolved
Hide resolved
* @throws IOException an IOException | ||
*/ | ||
@Override | ||
public void serialize(final @NotNull SentryEnvelope envelope, final @NotNull Writer writer) | ||
throws Exception { | ||
public void serialize(SentryEnvelope envelope, OutputStream stream) throws Exception { |
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.
public void serialize(SentryEnvelope envelope, OutputStream stream) throws Exception { | |
public void serialize(final @NotNull SentryEnvelope envelope, final @NotNull OutputStream stream) throws Exception { |
M: double-check if there are more missing.
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.
H: not sure if it's possible to use, as the OutputStream comes from the connection, but BufferedOutputStream
exists
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.
H: I'd rename to outputStream
as inputStream
also exists.
writer.write(buffer, 0, charsRead); | ||
} | ||
} | ||
for (SentryEnvelopeItem item : envelope.getItems()) { |
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.
for (SentryEnvelopeItem item : envelope.getItems()) { | |
for (final SentryEnvelopeItem item : envelope.getItems()) { |
Co-authored-by: Bruno Garcia <bruno@brunogarcia.com>
…nto feat/attachments
*/ | ||
@NotNull | ||
List<Attachment> getAttachments() { | ||
return attachments; |
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.
Here we need to return a new instance of a list instead of our private one
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.
Lets chips and iterate! 🚀
📢 Type of change
📜 Description
Add basic support for attachments.
💡 Motivation and Context
💚 How did you test it?
Unit tests and with a sample project.
📝 Checklist
🔮 Next steps