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