(span: Span)
| 310 | * So in the case where this distinction is important, use this method. |
| 311 | */ |
| 312 | export function spanIsSampled(span: Span): boolean { |
| 313 | // We align our trace flags with the ones OpenTelemetry use |
| 314 | // So we also check for sampled the same way they do. |
| 315 | const { traceFlags } = span.spanContext(); |
| 316 | return traceFlags === TRACE_FLAG_SAMPLED; |
| 317 | } |
| 318 | |
| 319 | /** Get the status message to use for a JSON representation of a span. */ |
| 320 | export function getStatusMessage(status: SpanStatus | undefined): string | undefined { |
no test coverage detected