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(core): Exclude Dev Server and Sentry Dsn request from Breadcrumbs #4240

Open
wants to merge 11 commits into
base: antonis/add-breadcrumb-origin
Choose a base branch
from

Conversation

antonis
Copy link
Collaborator

@antonis antonis commented Nov 6, 2024

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Filters out DevServer and DSN related breadcrumbs using the beforeBreadcrumb option on iOS, Android and JS:

Note: The current implementation excludes breadcrumbs with the dev server including the port. For example http://localhost:8081 breadcrumbs are excluded but http://localhost:8969/stream are not. A possible enhancement would be to get the host name from the dev server url and exclude all requests. This might have the side effect of missing other requests from a local development environment.

⚠️ This PR was initially based on #4124 to avoid conflicts. Since the implementation changed direction this is no longer needed.

💡 Motivation and Context

Fixes #3105

💚 How did you test it?

CI, Manual testing

Capture exception Before After
iOS event event
Android event event

📝 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
  • All tests passing
  • No breaking changes

🔮 Next steps

@antonis antonis changed the title Don't add Dev Server and Sentry Dsn request to BreadcrumsAntonis/3105 exclude dsn and devserver Exclude Dev Server and Sentry Dsn request from Breadcrums Nov 6, 2024
Copy link
Contributor

github-actions bot commented Nov 6, 2024

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 474.30 ms 473.56 ms -0.74 ms
Size 17.74 MiB 20.08 MiB 2.34 MiB

Baseline results on branch: antonis/add-breadcrumb-origin

Startup times

Revision Plain With Sentry Diff
c84e457 490.41 ms 489.28 ms -1.13 ms
168e871 471.56 ms 451.59 ms -19.97 ms
17fc2f7 420.78 ms 512.84 ms 92.07 ms
e62bf30 481.92 ms 471.48 ms -10.44 ms
2bd46a7 459.00 ms 442.70 ms -16.30 ms
9cee3c7 509.72 ms 513.58 ms 3.86 ms
f7ad13b 488.43 ms 500.04 ms 11.62 ms
e045c61 395.70 ms 386.29 ms -9.41 ms
093a11f 471.67 ms 487.81 ms 16.15 ms

App size

Revision Plain With Sentry Diff
c84e457 17.74 MiB 20.08 MiB 2.34 MiB
168e871 17.74 MiB 20.08 MiB 2.34 MiB
17fc2f7 17.74 MiB 20.08 MiB 2.34 MiB
e62bf30 17.73 MiB 20.11 MiB 2.38 MiB
2bd46a7 17.74 MiB 20.08 MiB 2.34 MiB
9cee3c7 17.74 MiB 20.08 MiB 2.34 MiB
f7ad13b 17.74 MiB 20.07 MiB 2.34 MiB
e045c61 17.74 MiB 20.07 MiB 2.34 MiB
093a11f 17.74 MiB 20.07 MiB 2.34 MiB

Previous results on branch: antonis/3105-exclude-dsn-and-devserver

Startup times

Revision Plain With Sentry Diff
0708e80 458.52 ms 458.78 ms 0.25 ms

App size

Revision Plain With Sentry Diff
0708e80 17.74 MiB 20.08 MiB 2.34 MiB

Copy link
Contributor

github-actions bot commented Nov 6, 2024

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1225.94 ms 1225.58 ms -0.36 ms
Size 2.36 MiB 3.10 MiB 752.93 KiB

Baseline results on branch: antonis/add-breadcrumb-origin

Startup times

Revision Plain With Sentry Diff
9cee3c7+dirty 1211.82 ms 1220.43 ms 8.61 ms
093a11f+dirty 1212.48 ms 1229.21 ms 16.73 ms
e045c61+dirty 1236.80 ms 1238.87 ms 2.08 ms
e62bf30+dirty 1238.96 ms 1243.39 ms 4.43 ms
2bd46a7+dirty 1218.10 ms 1220.43 ms 2.32 ms
f7ad13b+dirty 1217.18 ms 1220.83 ms 3.65 ms
c84e457+dirty 1218.30 ms 1224.08 ms 5.78 ms
168e871+dirty 1205.87 ms 1221.37 ms 15.50 ms
17fc2f7+dirty 1216.04 ms 1220.39 ms 4.35 ms

App size

Revision Plain With Sentry Diff
9cee3c7+dirty 2.36 MiB 3.08 MiB 737.39 KiB
093a11f+dirty 2.36 MiB 3.10 MiB 752.44 KiB
e045c61+dirty 2.36 MiB 3.10 MiB 753.19 KiB
e62bf30+dirty 2.36 MiB 3.15 MiB 802.94 KiB
2bd46a7+dirty 2.36 MiB 3.10 MiB 752.72 KiB
f7ad13b+dirty 2.36 MiB 3.10 MiB 753.14 KiB
c84e457+dirty 2.36 MiB 3.10 MiB 751.68 KiB
168e871+dirty 2.36 MiB 3.08 MiB 736.99 KiB
17fc2f7+dirty 2.36 MiB 3.08 MiB 737.22 KiB

Previous results on branch: antonis/3105-exclude-dsn-and-devserver

Startup times

Revision Plain With Sentry Diff
0708e80+dirty 1214.33 ms 1215.41 ms 1.08 ms

App size

Revision Plain With Sentry Diff
0708e80+dirty 2.36 MiB 3.10 MiB 752.89 KiB

Copy link
Contributor

github-actions bot commented Nov 6, 2024

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1245.27 ms 1225.79 ms -19.47 ms
Size 2.92 MiB 3.66 MiB 757.95 KiB

Baseline results on branch: antonis/add-breadcrumb-origin

Startup times

Revision Plain With Sentry Diff
9cee3c7+dirty 1237.08 ms 1232.16 ms -4.92 ms
093a11f+dirty 1238.33 ms 1237.33 ms -1.01 ms
e045c61+dirty 1225.21 ms 1230.33 ms 5.12 ms
e62bf30+dirty 1239.42 ms 1242.14 ms 2.73 ms
2bd46a7+dirty 1230.79 ms 1232.40 ms 1.61 ms
f7ad13b+dirty 1237.70 ms 1239.14 ms 1.44 ms
c84e457+dirty 1229.50 ms 1226.76 ms -2.74 ms
168e871+dirty 1234.31 ms 1227.67 ms -6.64 ms
17fc2f7+dirty 1234.25 ms 1234.78 ms 0.53 ms

App size

Revision Plain With Sentry Diff
9cee3c7+dirty 2.92 MiB 3.64 MiB 743.04 KiB
093a11f+dirty 2.92 MiB 3.66 MiB 757.73 KiB
e045c61+dirty 2.92 MiB 3.66 MiB 758.40 KiB
e62bf30+dirty 2.92 MiB 3.71 MiB 808.09 KiB
2bd46a7+dirty 2.92 MiB 3.66 MiB 757.44 KiB
f7ad13b+dirty 2.92 MiB 3.66 MiB 758.41 KiB
c84e457+dirty 2.92 MiB 3.66 MiB 756.01 KiB
168e871+dirty 2.92 MiB 3.64 MiB 742.68 KiB
17fc2f7+dirty 2.92 MiB 3.64 MiB 743.07 KiB

Previous results on branch: antonis/3105-exclude-dsn-and-devserver

Startup times

Revision Plain With Sentry Diff
0708e80+dirty 1240.56 ms 1226.98 ms -13.59 ms

App size

Revision Plain With Sentry Diff
0708e80+dirty 2.92 MiB 3.66 MiB 757.96 KiB

@antonis antonis changed the title Exclude Dev Server and Sentry Dsn request from Breadcrums Exclude Dev Server and Sentry Dsn request from Breadcrumbs Nov 12, 2024
Copy link
Contributor

github-actions bot commented Nov 12, 2024

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 410.63 ms 439.81 ms 29.18 ms
Size 7.15 MiB 8.35 MiB 1.20 MiB

Baseline results on branch: antonis/add-breadcrumb-origin

Startup times

Revision Plain With Sentry Diff
17fc2f7+dirty 409.50 ms 462.68 ms 53.18 ms
093a11f+dirty 415.54 ms 461.00 ms 45.46 ms
2bd46a7+dirty 369.18 ms 398.42 ms 29.24 ms
e045c61+dirty 434.98 ms 463.36 ms 28.38 ms
9cee3c7+dirty 397.49 ms 454.02 ms 56.53 ms
f7ad13b+dirty 478.18 ms 564.25 ms 86.07 ms
e62bf30+dirty 369.36 ms 405.27 ms 35.92 ms
c84e457+dirty 395.52 ms 432.24 ms 36.72 ms
168e871+dirty 508.96 ms 599.09 ms 90.13 ms

App size

Revision Plain With Sentry Diff
17fc2f7+dirty 7.15 MiB 8.35 MiB 1.20 MiB
093a11f+dirty 7.15 MiB 8.35 MiB 1.20 MiB
2bd46a7+dirty 7.15 MiB 8.35 MiB 1.20 MiB
e045c61+dirty 7.15 MiB 8.35 MiB 1.20 MiB
9cee3c7+dirty 7.15 MiB 8.35 MiB 1.20 MiB
f7ad13b+dirty 7.15 MiB 8.35 MiB 1.20 MiB
e62bf30+dirty 7.15 MiB 8.39 MiB 1.24 MiB
c84e457+dirty 7.15 MiB 8.35 MiB 1.20 MiB
168e871+dirty 7.15 MiB 8.35 MiB 1.20 MiB

Previous results on branch: antonis/3105-exclude-dsn-and-devserver

Startup times

Revision Plain With Sentry Diff
0708e80+dirty 391.91 ms 425.86 ms 33.95 ms

App size

Revision Plain With Sentry Diff
0708e80+dirty 7.15 MiB 8.35 MiB 1.20 MiB

@antonis antonis marked this pull request as ready for review November 13, 2024 11:16
@antonis antonis changed the title Exclude Dev Server and Sentry Dsn request from Breadcrumbs feat(core): Exclude Dev Server and Sentry Dsn request from Breadcrumbs Nov 13, 2024
Copy link
Contributor

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 575821e

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.

2 participants