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

Deprecate extra in favor of contexts #1435

Merged
merged 17 commits into from
May 15, 2023
Merged

Deprecate extra in favor of contexts #1435

merged 17 commits into from
May 15, 2023

Conversation

marandaneto
Copy link
Contributor

@marandaneto marandaneto commented May 10, 2023

📜 Description

Deprecate extra in favor of contexts.

💡 Motivation and Context

https://docs.sentry.io/platforms/python/enriching-events/context/#additional-data

💚 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

@marandaneto marandaneto changed the base branch from main to chore/fix-ios-batterylevel May 10, 2023 12:26
@marandaneto
Copy link
Contributor Author

Change the target branch to main since I've created it from the wrong branch.

@marandaneto marandaneto changed the title Fix battery level convertion for iOS 16.4 Deprecate extra in favor of contexts May 10, 2023
Base automatically changed from chore/fix-ios-batterylevel to main May 10, 2023 15:10
CHANGELOG.md Outdated Show resolved Hide resolved
@marandaneto marandaneto reopened this May 10, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 10, 2023

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 341.21 ms 400.47 ms 59.26 ms
Size 6.06 MiB 7.04 MiB 998.28 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e5b744f 302.70 ms 342.17 ms 39.47 ms
ecb4003 332.58 ms 385.15 ms 52.57 ms
e2d89fc 323.84 ms 376.23 ms 52.39 ms
895becc 326.94 ms 376.02 ms 49.08 ms
7ade5af 341.04 ms 386.84 ms 45.80 ms
0a23f98 377.19 ms 416.18 ms 39.00 ms
3a69405 334.34 ms 369.19 ms 34.85 ms
ad69abc 297.35 ms 385.89 ms 88.54 ms
9f9f94f 331.04 ms 368.92 ms 37.88 ms
deaeece 347.42 ms 381.10 ms 33.68 ms

App size

Revision Plain With Sentry Diff
e5b744f 6.06 MiB 7.09 MiB 1.03 MiB
ecb4003 6.06 MiB 7.09 MiB 1.03 MiB
e2d89fc 6.06 MiB 7.03 MiB 989.37 KiB
895becc 6.06 MiB 7.03 MiB 997.23 KiB
7ade5af 5.94 MiB 6.95 MiB 1.01 MiB
0a23f98 6.06 MiB 7.03 MiB 996.97 KiB
3a69405 5.94 MiB 6.95 MiB 1.01 MiB
ad69abc 6.06 MiB 7.09 MiB 1.03 MiB
9f9f94f 5.94 MiB 6.95 MiB 1.01 MiB
deaeece 5.94 MiB 6.96 MiB 1.02 MiB

Previous results on branch: chore/deprecate-extra

Startup times

Revision Plain With Sentry Diff
35c4a29 318.53 ms 382.90 ms 64.36 ms
7ef5a88 299.46 ms 364.27 ms 64.81 ms

App size

Revision Plain With Sentry Diff
35c4a29 6.06 MiB 7.03 MiB 997.05 KiB
7ef5a88 6.06 MiB 7.03 MiB 997.02 KiB

Copy link
Member

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

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

Looks good. The PR is still a draft will you be adding something more?

@marandaneto
Copy link
Contributor Author

Looks good. The PR is still a draft will you be adding something more?

I was just waiting CI/linting, but probably not.

@marandaneto marandaneto marked this pull request as ready for review May 11, 2023 08:58
@marandaneto marandaneto reopened this May 11, 2023
@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (801068d) 90.20% compared to head (0b6d15b) 90.20%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1435   +/-   ##
=======================================
  Coverage   90.20%   90.20%           
=======================================
  Files         181      181           
  Lines        5789     5789           
=======================================
  Hits         5222     5222           
  Misses        567      567           
Impacted Files Coverage Δ
dart/lib/src/protocol/sentry_event.dart 100.00% <ø> (ø)
dart/lib/src/protocol/sentry_transaction.dart 90.90% <ø> (ø)
dart/lib/src/scope.dart 98.35% <ø> (ø)
...nt_processor/flutter_enricher_event_processor.dart 94.18% <ø> (ø)
...ib/src/integrations/load_contexts_integration.dart 99.02% <ø> (ø)
...ter/lib/src/view_hierarchy/sentry_tree_walker.dart 100.00% <ø> (ø)
logging/lib/src/extension.dart 100.00% <ø> (ø)

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

@github-actions
Copy link
Contributor

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1245.25 ms 1258.76 ms 13.51 ms
Size 8.10 MiB 9.17 MiB 1.08 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
6957bfd 1283.80 ms 1289.00 ms 5.20 ms
c1bb00f 1265.14 ms 1290.85 ms 25.71 ms
a49594a 1284.83 ms 1313.29 ms 28.45 ms
211a7aa 1258.02 ms 1275.65 ms 17.63 ms
457a85b 1275.17 ms 1285.51 ms 10.34 ms
aed5947 1268.67 ms 1281.10 ms 12.43 ms
8e133ad 1268.19 ms 1277.37 ms 9.18 ms
873fb42 1261.00 ms 1285.92 ms 24.92 ms
90db9ff 1277.18 ms 1283.69 ms 6.51 ms
2f8f173 1280.61 ms 1292.20 ms 11.59 ms

App size

Revision Plain With Sentry Diff
6957bfd 8.15 MiB 9.15 MiB 1020.71 KiB
c1bb00f 8.09 MiB 9.07 MiB 1001.06 KiB
a49594a 8.16 MiB 9.16 MiB 1.00 MiB
211a7aa 8.10 MiB 9.18 MiB 1.08 MiB
457a85b 8.09 MiB 9.07 MiB 1000.88 KiB
aed5947 8.16 MiB 9.17 MiB 1.01 MiB
8e133ad 8.10 MiB 9.16 MiB 1.07 MiB
873fb42 8.16 MiB 9.17 MiB 1.01 MiB
90db9ff 8.10 MiB 9.08 MiB 1004.27 KiB
2f8f173 8.15 MiB 9.13 MiB 1000.39 KiB

Previous results on branch: chore/deprecate-extra

Startup times

Revision Plain With Sentry Diff
35c4a29 1254.32 ms 1287.57 ms 33.25 ms

App size

Revision Plain With Sentry Diff
35c4a29 8.10 MiB 9.17 MiB 1.08 MiB

@marandaneto marandaneto reopened this May 11, 2023
@marandaneto marandaneto reopened this May 15, 2023
@marandaneto marandaneto enabled auto-merge (squash) May 15, 2023 09:01
@marandaneto marandaneto merged commit 62de927 into main May 15, 2023
@marandaneto marandaneto deleted the chore/deprecate-extra branch May 15, 2023 09:13
@@ -28,6 +28,7 @@ extension LogRecordX on LogRecord {
level: level.toSentryLevel(),
message: SentryMessage(message),
throwable: error,
// ignore: deprecated_member_use

Choose a reason for hiding this comment

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

Hello, I would like to see PR that migrates the current variables in extra so that I can replicate the same steps on our app that has a custom implementation of sentry_logging

is is ok to attach specific error data to the suggested context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it's preferred actually https://docs.sentry.io/platforms/python/enriching-events/context/#additional-data
Although extra still works, and its probably not going to be removed any time soon, it's a soft deprecation as of now.

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.

4 participants