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

Add sent_at to envelope header item #2638

Merged
merged 9 commits into from
Apr 22, 2023
Merged

Conversation

denrase
Copy link
Collaborator

@denrase denrase commented Apr 4, 2023

📜 Description

  • Add sent_at property to envelope header
  • Set to current date before passing envelope to transport

💡 Motivation and Context

Relates to getsentry/sentry-dart#1337

Doc: https://develop.sentry.dev/sdk/envelopes/

💚 How did you test it?

Unit tests

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Add to cocoa sdk

@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 366.92 ms 404.13 ms 37.21 ms
Size 1.73 MiB 2.27 MiB 551.93 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
33c80c7 318.88 ms 348.14 ms 29.26 ms
17ab223 427.65 ms 484.31 ms 56.65 ms
d81684e 235.73 ms 328.76 ms 93.03 ms
33c80c7 331.94 ms 370.54 ms 38.60 ms

App size

Revision Plain With Sentry Diff
33c80c7 1.73 MiB 2.26 MiB 551.46 KiB
17ab223 1.73 MiB 2.34 MiB 626.85 KiB
d81684e 1.73 MiB 2.26 MiB 547.78 KiB
33c80c7 1.73 MiB 2.26 MiB 551.46 KiB

Previous results on branch: enha/envelope_header_sent_at

Startup times

Revision Plain With Sentry Diff
5367e69 320.04 ms 363.33 ms 43.29 ms
7280518 283.38 ms 348.82 ms 65.44 ms
d8bf1ac 324.34 ms 364.22 ms 39.88 ms

App size

Revision Plain With Sentry Diff
5367e69 1.73 MiB 2.27 MiB 551.83 KiB
7280518 1.73 MiB 2.27 MiB 551.83 KiB
d8bf1ac 1.73 MiB 2.26 MiB 550.51 KiB

@codecov
Copy link

codecov bot commented Apr 4, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.17 🎉

Comparison is base (4d04310) 81.25% compared to head (13c0650) 81.42%.

❗ Current head 13c0650 differs from pull request most recent head 15151ba. Consider uploading reports for the commit 15151ba to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2638      +/-   ##
============================================
+ Coverage     81.25%   81.42%   +0.17%     
+ Complexity     4259     4231      -28     
============================================
  Files           337      337              
  Lines         15741    15640     -101     
  Branches       2079     2040      -39     
============================================
- Hits          12790    12735      -55     
+ Misses         2130     2110      -20     
+ Partials        821      795      -26     
Impacted Files Coverage Δ
sentry/src/main/java/io/sentry/SentryClient.java 87.10% <ø> (ø)
...ry/transport/apache/ApacheHttpClientTransport.java 72.72% <100.00%> (+1.14%) ⬆️
.../src/main/java/io/sentry/SentryEnvelopeHeader.java 96.92% <100.00%> (+0.49%) ⬆️
...n/java/io/sentry/transport/AsyncHttpTransport.java 77.61% <100.00%> (+0.86%) ⬆️

... and 5 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@markushi markushi left a comment

Choose a reason for hiding this comment

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

Looking good! I left a few comments for some minor improvements

sentry/src/main/java/io/sentry/SentryClient.java Outdated Show resolved Hide resolved
sentry/src/main/java/io/sentry/SentryClient.java Outdated Show resolved Hide resolved
sentry/src/main/java/io/sentry/SentryEnvelopeHeader.java Outdated Show resolved Hide resolved
@denrase denrase marked this pull request as ready for review April 4, 2023 14:52
@denrase
Copy link
Collaborator Author

denrase commented Apr 17, 2023

Changed the implementation due to the discussion on the cocoa PR

getsentry/sentry-cocoa#2859

@romtsn romtsn enabled auto-merge (squash) April 22, 2023 07:19
@romtsn
Copy link
Member

romtsn commented Apr 22, 2023

thanks @denrase 👍

@romtsn romtsn merged commit ac1445b into main Apr 22, 2023
6 of 14 checks passed
@romtsn romtsn deleted the enha/envelope_header_sent_at branch April 22, 2023 07:22
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.

None yet

4 participants