Skip to content

add: POC of resourceFetchType#735

Draft
cdillard-NewRelic wants to merge 6 commits into
developfrom
poc-resourceFetchType
Draft

add: POC of resourceFetchType#735
cdillard-NewRelic wants to merge 6 commits into
developfrom
poc-resourceFetchType

Conversation

@cdillard-NewRelic

@cdillard-NewRelic cdillard-NewRelic commented May 19, 2026

Copy link
Copy Markdown
Member

It kind of works with this form:

    func fetchTypeDelegatePath() {
        NewRelic.logInfo("[FetchTypeTest A] firing delegate-session request #1")
        let t1 = self.fetchTypeSession.dataTask(with: self.fetchTypeURL)
        t1.resume()
        DispatchQueue.main.asyncAfter(deadline: .now() + 3) { [self] in
            NewRelic.logInfo("[FetchTypeTest A] firing delegate-session request #2")
            let t2 = self.fetchTypeSession.dataTask(with: self.fetchTypeURL)
            t2.resume()
        }
    }

yields mobileRequest events of type including new resourceFetchType and wireStatusCode

	}, {
		"id": "02c52bafce794505",
		"connectionType": "wifi",
		"timeSinceLoad": 16.618823051452637,
		"eventType": "MobileRequest",
		"timestamp": 1779215732618,
		"requestMethod": "GET",
		"contentType": "application\/json; charset=utf-8",
		"trace.id": "111e9845ce2142258b67f27a81a0563f",
		"requestDomain": "api.github.com",
		"requestUrl": "https:\/\/api.github.com\/users\/octocat",
		"requestPath": "\/users\/octocat",
		"resourceFetchType": "networkLoad",
		"statusCode": 200,
		"traceId": "111e9845ce2142258b67f27a81a0563f",
		"bytesReceived": 327,
		"guid": "02c52bafce794505",
		"responseTime": 6.9347348632812498,
		"wireStatusCode": 200,
		"payload": {
			"v": "[0,2]",
			"d": {
				"ap": "246132793",
				"ac": "10816994",
				"id": "02c52bafce794505",
				"tk": "1",
				"ti": 1779215725.6822128,
				"ty": "mobile",
				"tr": "111e9845ce2142258b67f27a81a0563f"
			}
		}
	}, {
		"id": "5dd2c0ae6117480a",
		"connectionType": "wifi",
		"timeSinceLoad": 16.621788024902344,
		"eventType": "MobileRequest",
		"timestamp": 1779215732621,
		"requestMethod": "GET",
		"contentType": "application\/json; charset=utf-8",
		"trace.id": "fe1911dd0c3647c08fe5425d6c83451f",
		"requestDomain": "api.github.com",
		"requestUrl": "https:\/\/api.github.com\/users\/octocat",
		"requestPath": "\/users\/octocat",
		"resourceFetchType": "localCache",
		"statusCode": 200,
		"traceId": "fe1911dd0c3647c08fe5425d6c83451f",
		"bytesReceived": 469,
		"guid": "5dd2c0ae6117480a",
		"responseTime": 0.0048198242187500002,
		"wireStatusCode": 200,
		"payload": {
			"v": "[0,2]",
			"d": {
				"ap": "246132793",
				"ac": "10816994",
				"id": "5dd2c0ae6117480a",
				"tk": "1",
				"ti": 1779215732.616358,
				"ty": "mobile",
				"tr": "fe1911dd0c3647c08fe5425d6c83451f"
			}
		}
	},
	```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant