Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/observability / / getCurrentSpanContext
Function: getCurrentSpanContext()
ts
function getCurrentSpanContext():
| {
spanId: string;
traceId: string;
}
| undefined;Defined in: packages/observability/src/logger/logger.ts:77
Read the current span context (if any). Useful for callers that want to attach span metadata to bespoke records.
Returns
| { spanId: string; traceId: string; } | undefined