Skip to content

Commit

Permalink
Merge 8511692 into cd8dad3
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrenskers authored Nov 14, 2022
2 parents cd8dad3 + 8511692 commit db3535b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

- Fix issue with invalid profiles uploading (#2358 and #2359)
- Call UIDevice methods on the main thread (#2369)
- Don't increase session's error count for dropped events (#2374)
- Avoid sending profiles with 0 samples or incorrectly deduplicated backtrace elements (#2375)

## 7.30.0
Expand Down
5 changes: 5 additions & 0 deletions Sources/Sentry/SentryClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ - (SentryId *)captureError:(NSError *)error
{
SentryEvent *event = [self buildErrorEvent:error];
event = [self prepareEvent:event withScope:scope alwaysAttachStacktrace:YES];

if (event != nil) {
session = [SentrySDK.currentHub incrementSessionErrors];
}

return [self sendEvent:event withSession:session withScope:scope];
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Sentry/SentryHub.m
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ - (SentryId *)captureError:(NSError *)error

- (SentryId *)captureError:(NSError *)error withScope:(SentryScope *)scope
{
SentrySession *currentSession = [self incrementSessionErrors];
SentrySession *currentSession = _session;
SentryClient *client = _client;
if (nil != client) {
if (nil != currentSession) {
Expand Down
2 changes: 2 additions & 0 deletions Sources/Sentry/include/SentryHub+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ SentryHub (Private)
withScope:(SentryScope *)scope
additionalEnvelopeItems:(NSArray<SentryEnvelopeItem *> *)additionalEnvelopeItems;

- (nullable SentrySession *)incrementSessionErrors;

@end

NS_ASSUME_NONNULL_END

0 comments on commit db3535b

Please sign in to comment.