-
-
Notifications
You must be signed in to change notification settings - Fork 448
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
Implement local scope by adding overloads to the capture methods that accept a ScopeCallback #2084
Conversation
…ethods to Sentry.java, adapt tests, use correct methods in HubAdapter
…t failing due to method overload ambiguity
CHANGELOG.md
Outdated
|
||
### Features | ||
|
||
- Implement local scope by adding overloads to the capture methods that accept a ScopeCallback ([#2075](https://github.com/getsentry/sentry-java/pull/2075)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Implement local scope by adding overloads to the capture methods that accept a ScopeCallback ([#2075](https://github.com/getsentry/sentry-java/pull/2075)) | |
- Implement local scope by adding overloads to the capture methods that accept a ScopeCallback ([#2084](https://github.com/getsentry/sentry-java/pull/2084)) |
What do we want to do with the docs here https://docs.sentry.io/platforms/java/enriching-events/scopes/#local-scopes The docs claim that |
Opened #2083 to deprecate |
# Conflicts: # CHANGELOG.md
CHANGELOG.md
Outdated
## 6.0.0 | ||
|
||
### Sentry Self-hosted Compatibility | ||
|
||
- Starting with version `6.0.0` of the `sentry` package, [Sentry's self hosted version >= v21.9.0](https://github.com/getsentry/self-hosted/releases) is required or you have to manually disable sending client reports via the `sendClientReports` option. This only applies to self-hosted Sentry. If you are using [sentry.io](https://sentry.io), no action is needed. | ||
|
||
### Features | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather keep a line break after the headers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, wasn't intentional :) new line is back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there were 2 line breaks before all the merging happened.
private Scope buildLocalScope( | ||
final @NotNull Scope scope, final @Nullable ScopeCallback callback) { | ||
if (callback != null) { | ||
Scope localScope = new Scope(scope); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scope localScope = new Scope(scope); | |
final Scope localScope = new Scope(scope); |
It's technically a breaking change since it adds new methods to the public interfaces e.g. |
After releasing this, we can finally add local scope support for our Android support as well, this would require changing the docs for Java and Android, https://docs.sentry.io/platforms/android/enriching-events/scopes/ and https://docs.sentry.io/platforms/java/enriching-events/scopes/#local-scopes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adinauer Thanks for doing this.
Left a few comments, but LGTM anyway so you are unblocked to fix and merge it.
Codecov Report
@@ Coverage Diff @@
## main #2084 +/- ##
============================================
- Coverage 81.18% 81.11% -0.08%
- Complexity 3223 3232 +9
============================================
Files 230 230
Lines 11821 11850 +29
Branches 1572 1572
============================================
+ Hits 9597 9612 +15
- Misses 1638 1652 +14
Partials 586 586
Continue to review full report at Codecov.
|
Next step: add docs as suggested and keep
|
📜 Description
Reopened because #2075 was auto closed by GitHub ...
Add overloads with scope callback for
captureEvent
,captureException
andcaptureMessage
to allow users to modify the scope for a single invocation of the capture methods.💡 Motivation and Context
fixes #1829
💚 How did you test it?
📝 Checklist
🔮 Update Docs