Skip to content

Commit

Permalink
ref: Rename "http.method" to "http.request.method" for network Spans (#…
Browse files Browse the repository at this point in the history
…3268)

* renaming http.method to http.request.method

* Format code

* Update CHANGELOG.md

* Update no-changes-in-high-risk-files.sh

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
  • Loading branch information
brustolin and getsentry-bot committed Sep 6, 2023
1 parent 289c0b8 commit d61b939
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -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
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
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
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

0 comments on commit d61b939

Please sign in to comment.