(status: SpanStatus | undefined)
| 333 | * Convert the various statuses to the simple ones expected by Sentry for streamed spans ('ok' is default). |
| 334 | */ |
| 335 | export function getSimpleStatus(status: SpanStatus | undefined): 'ok' | 'error' { |
| 336 | return !status || |
| 337 | status.code === SPAN_STATUS_OK || |
| 338 | status.code === SPAN_STATUS_UNSET || |
| 339 | status.message === 'cancelled' |
| 340 | ? 'ok' |
| 341 | : 'error'; |
| 342 | } |
| 343 | |
| 344 | /** |
| 345 | * Returns the span's attributes with the SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE attribute added |
no outgoing calls
no test coverage detected