UNPKG

1.14 kBTypeScriptView Raw
1import { Context } from '../context/types';
2import { Span } from './span';
3import { SpanContext } from './span_context';
4/**
5 * Return the span if one exists
6 *
7 * @param context context to get span from
8 */
9export declare function getSpan(context: Context): Span | undefined;
10/**
11 * Set the span on a context
12 *
13 * @param context context to use as parent
14 * @param span span to set active
15 */
16export declare function setSpan(context: Context, span: Span): Context;
17/**
18 * Remove current span stored in the context
19 *
20 * @param context context to delete span from
21 */
22export declare function deleteSpan(context: Context): Context;
23/**
24 * Wrap span context in a NoopSpan and set as span in a new
25 * context
26 *
27 * @param context context to set active span on
28 * @param spanContext span context to be wrapped
29 */
30export declare function setSpanContext(context: Context, spanContext: SpanContext): Context;
31/**
32 * Get the span context of the span if it exists.
33 *
34 * @param context context to get values from
35 */
36export declare function getSpanContext(context: Context): SpanContext | undefined;
37//# sourceMappingURL=context-utils.d.ts.map
\No newline at end of file