We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f091422 + 5014580 commit b948c7fCopy full SHA for b948c7f
src/opentelemetry/instrumentation/crystal/http_client.cr
@@ -117,12 +117,14 @@ unless_enabled?("OTEL_CRYSTAL_DISABLE_INSTRUMENTATION_HTTP_CLIENT") do
117
118
response = yield request
119
120
- span["http.status_code"] = response.status_code
121
- if response.success?
122
- # span.status.ok!
123
- else
124
- span.status.error!
125
- span["http.status_message"] = response.status_message.to_s
+ if response.is_a?(HTTP::Client::Response)
+ span["http.status_code"] = response.status_code
+ if response.success?
+ # span.status.ok!
+ else
+ span.status.error!
126
+ span["http.status_message"] = response.status_message.to_s
127
+ end
128
end
129
130
response
0 commit comments