Method: Sentry::Span#set_http_status
- Defined in:
- lib/sentry/span.rb
permalink #set_http_status(status_code) ⇒ Object
Sets the span’s status with given http status code.
277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/sentry/span.rb', line 277 def set_http_status(status_code) status_code = status_code.to_i set_data(DataConventions::HTTP_STATUS_CODE, status_code) status = if status_code >= 200 && status_code < 299 "ok" else STATUS_MAP[status_code] end set_status(status) end |