Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion scripts/no-changes-in-high-risk-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euo pipefail

ACTUAL=$(shasum -a 256 ./Sources/Sentry/SentryNSURLSessionTaskSearch.m ./Sources/Sentry/SentryNetworkTracker.m ./Sources/Sentry/SentryUIViewControllerSwizzling.m ./Sources/Sentry/SentryNSDataSwizzling.m ./Sources/Sentry/SentrySubClassFinder.m ./Sources/Sentry/SentryCoreDataSwizzling.m ./Sources/Sentry/SentrySwizzleWrapper.m ./Sources/Sentry/include/SentrySwizzle.h ./Sources/Sentry/SentrySwizzle.m)
EXPECTED="819d5ca5e3db2ac23c859b14c149b7f0754d3ae88bea1dba92c18f49a81da0e1 ./Sources/Sentry/SentryNSURLSessionTaskSearch.m
545bdd91204ab45d04328dd40233b6fc789b216e1301b5fe2ef23b56db6e3719 ./Sources/Sentry/SentryNetworkTracker.m
57056426d77fd1cc27e72bdcea4bbf617dd8c1e82eecf003df8f0e348aae90ab ./Sources/Sentry/SentryNetworkTracker.m
128dee523c75c121e9b8b767d84a2a137e5b60498c9f3ba604aad3c935d780d0 ./Sources/Sentry/SentryUIViewControllerSwizzling.m
e95e62ec7363984f20c78643bb7d992a41a740f97e1befb71525ac34caf88b37 ./Sources/Sentry/SentryNSDataSwizzling.m
9ad05dd8dd29788cba994736fdcd3bbde59a94e32612640d11f4f9c38ad6610e ./Sources/Sentry/SentrySubClassFinder.m
Expand Down