(span: Span, httpStatus: number)
| 59 | * Additionally, the span's status is updated, depending on the http code. |
| 60 | */ |
| 61 | export function setHttpStatus(span: Span, httpStatus: number): void { |
| 62 | span.setAttribute('http.response.status_code', httpStatus); |
| 63 | |
| 64 | const spanStatus = getSpanStatusFromHttpCode(httpStatus); |
| 65 | if (spanStatus.message !== 'unknown_error') { |
| 66 | span.setStatus(spanStatus); |
| 67 | } |
| 68 | } |
no test coverage detected