Skip to content

Commit

Permalink
try main code
Browse files Browse the repository at this point in the history
  • Loading branch information
cdillard-NewRelic committed Dec 12, 2024
1 parent 893f543 commit 0b1a8a4
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,13 @@ void NRMAOverride__urlSessionTask_SetState(NSURLSessionTask* task, SEL _cmd, NSU
// Checking for NEW_RELIC_CROSS_PROCESS_ID_HEADER_KEY in the headers here. The data usually isn't link to the task yet here so, if that header exists we are handling the task elsewhere and have a better chance of getting the data so we don't need to record it here.
NSURLRequest *currentRequest = task.currentRequest;

if (currentRequest == nil) {
return;
}

if ([currentRequest valueForHTTPHeaderField:NEW_RELIC_CROSS_PROCESS_ID_HEADER_KEY] != nil) {
if(currentRequest != nil && [currentRequest valueForHTTPHeaderField:NEW_RELIC_CROSS_PROCESS_ID_HEADER_KEY] != nil) {
return;
}

NSURL *url = [currentRequest URL];
if (url != nil &&
newState != NSURLSessionTaskStateRunning && task.state == NSURLSessionTaskStateRunning) {
task.state == NSURLSessionTaskStateRunning) {

// Added this section to add Distributed Tracing traceId\trace.id, guid,id and payload.
//1
Expand Down

0 comments on commit 0b1a8a4

Please sign in to comment.