Skip to content

Commit

Permalink
Rename http.method to http.request.method in span data (#2106)
Browse files Browse the repository at this point in the history
  • Loading branch information
sl0thentr0py committed Sep 12, 2023
1 parent 65c209a commit 1745db2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Unreleased

### Bug Fixes

- Rename `http.method` to `http.request.method` in `Span::DataConventions` [#2106](https://github.com/getsentry/sentry-ruby/pull/2106)

## 5.11.0

### Features
Expand Down
2 changes: 1 addition & 1 deletion sentry-ruby/lib/sentry/span.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module DataConventions
URL = "url"
HTTP_STATUS_CODE = "http.response.status_code"
HTTP_QUERY = "http.query"
HTTP_METHOD = "http.method"
HTTP_METHOD = "http.request.method"

# An identifier for the database management system (DBMS) product being used.
# Example: postgresql
Expand Down
8 changes: 4 additions & 4 deletions sentry-ruby/spec/sentry/net/http_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
expect(request_span.data).to eq({
"http.response.status_code" => 200,
"url" => "http://example.com/path",
"http.method" => "GET",
"http.request.method" => "GET",
"http.query" => "foo=bar"
})
end
Expand Down Expand Up @@ -76,7 +76,7 @@
expect(request_span.data).to eq({
"http.response.status_code" => 200,
"url" => "http://example.com/path",
"http.method" => "GET",
"http.request.method" => "GET",
})
end
end
Expand Down Expand Up @@ -303,7 +303,7 @@ def verify_spans(transaction)
expect(request_span.data).to eq({
"http.response.status_code" => 200,
"url" => "http://example.com/path",
"http.method" => "GET",
"http.request.method" => "GET",
})

request_span = transaction.span_recorder.spans[2]
Expand All @@ -315,7 +315,7 @@ def verify_spans(transaction)
expect(request_span.data).to eq({
"http.response.status_code" => 404,
"url" => "http://example.com/path",
"http.method" => "GET",
"http.request.method" => "GET",
})
end

Expand Down

0 comments on commit 1745db2

Please sign in to comment.