1 | import type { MeasurementUnit, Primitive, Span, SpanAttributes, SpanJSON, SpanStatus, SpanTimeInput, TraceContext } from '@sentry/types';
|
2 | import type { MetricType } from '../metrics/types';
|
3 | export declare const TRACE_FLAG_NONE = 0;
|
4 | export declare const TRACE_FLAG_SAMPLED = 1;
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export declare function spanToTransactionTraceContext(span: Span): TraceContext;
|
11 |
|
12 |
|
13 |
|
14 | export declare function spanToTraceContext(span: Span): TraceContext;
|
15 |
|
16 |
|
17 |
|
18 | export declare function spanToTraceHeader(span: Span): string;
|
19 |
|
20 |
|
21 |
|
22 | export declare function spanTimeInputToSeconds(input: SpanTimeInput | undefined): number;
|
23 |
|
24 |
|
25 |
|
26 | export declare function spanToJSON(span: Span): Partial<SpanJSON>;
|
27 |
|
28 | export interface OpenTelemetrySdkTraceBaseSpan extends Span {
|
29 | attributes: SpanAttributes;
|
30 | startTime: SpanTimeInput;
|
31 | name: string;
|
32 | status: SpanStatus;
|
33 | endTime: SpanTimeInput;
|
34 | parentSpanId?: string;
|
35 | }
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | export declare function spanIsSampled(span: Span): boolean;
|
43 |
|
44 | export declare function getStatusMessage(status: SpanStatus | undefined): string | undefined;
|
45 | declare const CHILD_SPANS_FIELD = "_sentryChildSpans";
|
46 | declare const ROOT_SPAN_FIELD = "_sentryRootSpan";
|
47 | type SpanWithPotentialChildren = Span & {
|
48 | [CHILD_SPANS_FIELD]?: Set<Span>;
|
49 | [ROOT_SPAN_FIELD]?: Span;
|
50 | };
|
51 |
|
52 |
|
53 |
|
54 | export declare function addChildSpanToSpan(span: SpanWithPotentialChildren, childSpan: Span): void;
|
55 |
|
56 | export declare function removeChildSpanFromSpan(span: SpanWithPotentialChildren, childSpan: Span): void;
|
57 |
|
58 |
|
59 |
|
60 | export declare function getSpanDescendants(span: SpanWithPotentialChildren): Span[];
|
61 |
|
62 |
|
63 |
|
64 | export declare function getRootSpan(span: SpanWithPotentialChildren): Span;
|
65 |
|
66 |
|
67 |
|
68 | export declare function getActiveSpan(): Span | undefined;
|
69 |
|
70 |
|
71 |
|
72 | export declare function updateMetricSummaryOnActiveSpan(metricType: MetricType, sanitizedName: string, value: number, unit: MeasurementUnit, tags: Record<string, Primitive>, bucketKey: string): void;
|
73 | export {};
|
74 |
|
\ | No newline at end of file |