Core Functions
generateTraceContextFactory
- generateTraceContextFactory(generateTraceId: (() => string), generateSpanId: (() => string)): ((traceId?: string, parentId?: string, spanId?: string, sampled?: boolean, version?: number) => TraceContext)
Parameters
generateTraceId: (() => string)
generateSpanId: (() => string)
Returns ((traceId?: string, parentId?: string, spanId?: string, sampled?: boolean, version?: number) => TraceContext)
- (traceId?: string, parentId?: string, spanId?: string, sampled?: boolean, version?: number): TraceContext
Parameters
Optional traceId: string
Optional parentId: string
Optional spanId: string
Optional sampled: boolean
Optional version: number
parseTraceparentHeaderFactory
- parseTraceparentHeaderFactory(generateSpanId: (() => string)): ((traceparentHeader: string, spanId?: string) => TraceContext)
Parameters
generateSpanId: (() => string)
Returns ((traceparentHeader: string, spanId?: string) => TraceContext)
Parameters
traceparentHeader: string
Optional spanId: string
Factory for the generateTraceContext-function. See Advanced Topics for more information.