Skip to content

Commit f340dc8

Browse files
committed
Add http.version to client/server traces.
1 parent a0f06f0 commit f340dc8

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ permissions:
77

88
env:
99
CONSOLE_OUTPUT: XTerm
10+
TRACES_BACKEND: traces/backend/test
11+
METRICS_BACKEND: metrics/backend/test
1012

1113
jobs:
1214
test:

lib/async/http/client.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ def call(request)
165165
end
166166

167167
super.tap do |response|
168+
if version = response&.version
169+
span['http.version'] = version
170+
end
171+
168172
if status = response&.status
169173
span['http.status_code'] = status
170174
end

lib/async/http/server.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def call(request)
8181
end
8282

8383
attributes = {
84+
'http.version': request.version,
8485
'http.method': request.method,
8586
'http.authority': request.authority,
8687
'http.scheme': request.scheme,

0 commit comments

Comments
 (0)