Skip to content

Commit

Permalink
Merge 7e1de03 into 9fa25c2
Browse files Browse the repository at this point in the history
  • Loading branch information
brustolin committed Sep 5, 2023
2 parents 9fa25c2 + 7e1de03 commit f49a024
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Features

- Rename "http.method" to "http.request.method" for network Spans #3268

## 8.11.0

### Features
Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/SentryNetworkTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ - (void)urlSessionTaskResume:(NSURLSessionTask *)sessionTask
safeUrl.sanitizedUrl]];
netSpan.origin = SentryTraceOriginAutoHttpNSURLSession;

[netSpan setDataValue:sessionTask.currentRequest.HTTPMethod forKey:@"http.method"];
[netSpan setDataValue:sessionTask.currentRequest.HTTPMethod
forKey:@"http.request.method"];
[netSpan setDataValue:safeUrl.sanitizedUrl forKey:@"url"];
[netSpan setDataValue:@"fetch" forKey:@"type"];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ class SentryNetworkTrackerTests: XCTestCase {
}

let path = span.data["url"] as? String
let method = span.data["http.method"] as? String
let method = span.data["http.request.method"] as? String
let requestType = span.data["type"] as? String
let query = span.data["http.query"] as? String
let fragment = span.data["http.fragment"] as? String
Expand Down

0 comments on commit f49a024

Please sign in to comment.