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/only send debug images referenced in the stacktrace for events #2329

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

martinhaintz
Copy link
Collaborator

📜 Description

Instead of sending all debug images in case of errors, we only want to send the referenced debug images of the stacktrace to be sent.

💡 Motivation and Context

close #1755

💚 How did you test it?

??

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

Copy link
Contributor

github-actions bot commented Oct 7, 2024

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Feat/only send debug images referenced in the stacktrace for events ([#2329](https://github.com/getsentry/sentry-dart/pull/2329))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against fa97c64

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.31%. Comparing base (905bf99) to head (fa97c64).

❗ There is a different number of reports uploaded between BASE (905bf99) and HEAD (fa97c64). Click for more details.

HEAD has 8 uploads less than BASE
Flag BASE (905bf99) HEAD (fa97c64)
9 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2329       +/-   ##
===========================================
- Coverage   86.38%   63.31%   -23.08%     
===========================================
  Files         247        4      -243     
  Lines        8615      169     -8446     
===========================================
- Hits         7442      107     -7335     
+ Misses       1173       62     -1111     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@martinhaintz
Copy link
Collaborator Author

@buenaflor any ideas, what would be the best way to test this? print and log are disabled in Flutter for release builds.

Copy link
Contributor

github-actions bot commented Oct 7, 2024

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 472.71 ms 530.63 ms 57.92 ms
Size 6.49 MiB 7.56 MiB 1.07 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
31b2afb 397.04 ms 475.09 ms 78.04 ms
b2cbbc8 347.80 ms 395.31 ms 47.51 ms
e6b16cd 523.24 ms 594.77 ms 71.53 ms
3f23617 385.77 ms 476.10 ms 90.33 ms
ecb4003 332.58 ms 385.15 ms 52.57 ms
be8cafe 405.40 ms 470.95 ms 65.56 ms
4b943a1 348.17 ms 437.15 ms 88.98 ms
c978477 347.00 ms 409.94 ms 62.94 ms
746a779 347.94 ms 385.71 ms 37.78 ms
90db9ff 334.86 ms 388.14 ms 53.28 ms

App size

Revision Plain With Sentry Diff
31b2afb 6.34 MiB 7.28 MiB 966.36 KiB
b2cbbc8 6.06 MiB 7.03 MiB 995.45 KiB
e6b16cd 6.35 MiB 7.33 MiB 1005.63 KiB
3f23617 5.94 MiB 6.96 MiB 1.02 MiB
ecb4003 6.06 MiB 7.09 MiB 1.03 MiB
be8cafe 6.34 MiB 7.29 MiB 969.12 KiB
4b943a1 6.34 MiB 7.28 MiB 968.41 KiB
c978477 6.33 MiB 7.29 MiB 987.32 KiB
746a779 6.27 MiB 7.20 MiB 956.05 KiB
90db9ff 6.06 MiB 7.10 MiB 1.04 MiB

Previous results on branch: feat/only-send-debug-images-referenced-in-the-stacktrace-for-events

Startup times

Revision Plain With Sentry Diff
bad0c67 463.64 ms 517.10 ms 53.46 ms

App size

Revision Plain With Sentry Diff
bad0c67 6.49 MiB 7.56 MiB 1.07 MiB

Copy link
Contributor

github-actions bot commented Oct 7, 2024

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1264.96 ms 1289.26 ms 24.30 ms
Size 8.38 MiB 9.74 MiB 1.36 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
c57d3b7 1249.92 ms 1280.31 ms 30.39 ms
6f3717a 1259.84 ms 1280.90 ms 21.06 ms
3e33891 6245.86 ms 6260.90 ms 15.04 ms
bffc2c5 1239.76 ms 1264.67 ms 24.92 ms
6fedcab 1242.33 ms 1269.66 ms 27.33 ms
9f9f94f 1268.33 ms 1284.73 ms 16.41 ms
55cc6ef 1271.92 ms 1281.04 ms 9.12 ms
d53c6fa 1254.86 ms 1270.83 ms 15.97 ms
a817b8f 1261.90 ms 1264.62 ms 2.73 ms
117d988 1200.83 ms 1223.24 ms 22.41 ms

App size

Revision Plain With Sentry Diff
c57d3b7 8.32 MiB 9.52 MiB 1.20 MiB
6f3717a 8.33 MiB 9.62 MiB 1.29 MiB
3e33891 8.29 MiB 9.38 MiB 1.09 MiB
bffc2c5 8.33 MiB 9.40 MiB 1.07 MiB
6fedcab 8.32 MiB 9.50 MiB 1.18 MiB
9f9f94f 8.15 MiB 9.15 MiB 1020.76 KiB
55cc6ef 8.10 MiB 9.18 MiB 1.08 MiB
d53c6fa 8.29 MiB 9.39 MiB 1.10 MiB
a817b8f 8.29 MiB 9.37 MiB 1.07 MiB
117d988 8.32 MiB 9.38 MiB 1.05 MiB

Previous results on branch: feat/only-send-debug-images-referenced-in-the-stacktrace-for-events

Startup times

Revision Plain With Sentry Diff
bad0c67 1252.14 ms 1262.27 ms 10.13 ms

App size

Revision Plain With Sentry Diff
bad0c67 8.38 MiB 9.74 MiB 1.36 MiB

if (images != null) {
return event.copyWith(debugMeta: DebugMeta(images: images));
}
}

return event;
}

Set<String> _collectImageAddressesFromStackTrace(SentryStackTrace trace) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe pass the set as an argument to avoid creating intermediate sets on each invocation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@vaind can you please explain it a little bit more, what you mean? Thanks.

Copy link
Contributor

@buenaflor buenaflor Oct 8, 2024

Choose a reason for hiding this comment

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

void _collectInstructionAddresses(
  SentryEvent event,
  Set<String> instructionAddresses,
)

he probably means like this

Copy link
Collaborator

Choose a reason for hiding this comment

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

exactly, thanks @buenaflor

…e-for-events' of https://github.com/getsentry/sentry-dart into feat/only-send-debug-images-referenced-in-the-stacktrace-for-events

* 'feat/only-send-debug-images-referenced-in-the-stacktrace-for-events' of https://github.com/getsentry/sentry-dart:
  Fix TTID timing issue (#2326)
  fix: dart2wasm test (#2327)
  Deprecate: metrics api (#2312)
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.

Only send debug images referenced in the stacktrace for events
3 participants