Skip to content

Commit

Permalink
NR-371375 made sure currentTraceId and currentParentId are instantiat…
Browse files Browse the repository at this point in the history
…ed also use synchronized with self (#347)
  • Loading branch information
mbruin-NR authored Feb 19, 2025
1 parent 6ba0f1a commit bcc8ebf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Agent/Network/NRMAHTTPUtilities.mm
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
static NSString* _operationId = @"X-APOLLO-OPERATION-ID";

@implementation NRMAHTTPUtilities
NSString* currentTraceId;
NSString* currentParentId;
NSString* currentTraceId = @"";
NSString* currentParentId = @"";

+ (NSArray*) trackedHeaderFields
{
Expand Down Expand Up @@ -195,7 +195,7 @@ + (NRMAPayload *) startTrip {
return nil;
}

@synchronized (currentTraceId) {
@synchronized (self) {
NSString * accountID = @(NewRelic::Application::getInstance().getContext().getAccountId().c_str());
NSString * appId = @(NewRelic::Application::getInstance().getContext().getApplicationId().c_str());
NSString * trustedAccountKey = @(NewRelic::Application::getInstance().getContext().getTrustedAccountKey().c_str());
Expand Down

0 comments on commit bcc8ebf

Please sign in to comment.