Skip to content

Commit

Permalink
feat: ✨ handle correlation property in ios events
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerbenw committed Aug 1, 2024
1 parent 8099ab7 commit 371f791
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ - (BugsnagEvent *)deserializeEvent:(NSDictionary *)payload {

BugsnagHandledState *handledState = [self deserializeHandledState:payload];
NSDictionary *user = payload[@"user"];
NSDictionary *correlation = payload[@"correlation"];

BugsnagEvent *event = [[BugsnagEvent alloc] initWithApp:[BugsnagAppWithState appFromJson:payload[@"app"]]
device:[BugsnagDeviceWithState deviceFromJson:payload[@"device"]]
Expand All @@ -30,6 +31,8 @@ - (BugsnagEvent *)deserializeEvent:(NSDictionary *)payload {
event.context = payload[@"context"];
event.groupingHash = payload[@"groupingHash"];

[event setCorrelationTraceId:correlation[@"traceId"] spanId:correlation[@"spanId"]];

if (payload[@"apiKey"]) {
event.apiKey = payload[@"apiKey"];
}
Expand Down

0 comments on commit 371f791

Please sign in to comment.