(span: Span)
| 257 | ): Promise<T> { |
| 258 | const tracer = getTracer() |
| 259 | const runBody = async (span: Span) => { |
| 260 | try { |
| 261 | const result = await fn(span) |
| 262 | span.setStatus({ code: SpanStatusCode.OK }) |
| 263 | return result |
| 264 | } catch (error) { |
| 265 | markSpanForError(span, error) |
| 266 | throw error |
| 267 | } finally { |
| 268 | span.end() |
| 269 | } |
| 270 | } |
| 271 | if (parentContext) { |
| 272 | return tracer.startActiveSpan(spanName, { attributes }, parentContext, runBody) |
| 273 | } |
nothing calls this directly
no test coverage detected