Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

change integration order for cached outbox events #347

Merged
merged 1 commit into from
Apr 7, 2020
Merged

change integration order for cached outbox events #347

merged 1 commit into from
Apr 7, 2020

Conversation

marandaneto
Copy link
Contributor

@marandaneto marandaneto commented Apr 7, 2020

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

change integration order for cached outbox events.

💡 Motivation and Context

as sentry-native move files around on init. and the outbox file observer now is inited after the NDK integration.
This integration also should be executed afterwards, so hard crashes will be in place and ready to be sent.
I've needed to make DirectoryProcessor public.

💚 How did you test it?

running and testing it.

📝 Checklist

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

🔮 Next steps

@codecov-io
Copy link

codecov-io commented Apr 7, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@c1ed15f). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #347   +/-   ##
=========================================
  Coverage          ?   58.96%           
  Complexity        ?      760           
=========================================
  Files             ?       87           
  Lines             ?     3529           
  Branches          ?      340           
=========================================
  Hits              ?     2081           
  Misses            ?     1298           
  Partials          ?      150           
Impacted Files Coverage Δ Complexity Δ
...c/main/java/io/sentry/core/DirectoryProcessor.java 67.34% <ø> (ø) 7.00 <0.00> (?)
...re/src/main/java/io/sentry/core/SentryOptions.java 76.87% <ø> (ø) 67.00 <0.00> (?)
.../core/SendCachedEventFireAndForgetIntegration.java 81.81% <100.00%> (ø) 4.00 <1.00> (?)
...re/src/main/java/io/sentry/core/ISentryClient.java 88.88% <0.00%> (ø) 9.00% <0.00%> (?%)
...java/io/sentry/core/transport/AsyncConnection.java 66.43% <0.00%> (ø) 13.00% <0.00%> (?%)
.../java/io/sentry/core/protocol/OperatingSystem.java 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
...ore/src/main/java/io/sentry/core/util/Objects.java 100.00% <0.00%> (ø) 2.00% <0.00%> (?%)
...c/main/java/io/sentry/core/SentryEnvelopeItem.java 81.39% <0.00%> (ø) 10.00% <0.00%> (?%)
...e/src/main/java/io/sentry/core/SessionAdapter.java 1.94% <0.00%> (ø) 2.00% <0.00%> (?%)
.../main/java/io/sentry/core/SentryThreadFactory.java 90.90% <0.00%> (ø) 12.00% <0.00%> (?%)
... and 80 more

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 c1ed15f...d081b4e. Read the comment docs.

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

One suggestion

// this should be executed after NdkIntegration because sentry-native move files on init.
// and we'd like to send them right away
options.addIntegration(
new SendCachedEventFireAndForgetIntegration(
Copy link
Member

Choose a reason for hiding this comment

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

One improvement is to pull this code into a its own class and adding here new Integration()
This would simplify this method a bit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, could be done for the others too then, I just copy-pasta for now, but agreed, will raise other PR for all of them

@marandaneto marandaneto merged commit 6d9af22 into getsentry:master Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants