@opentelemetry/api 0.21.0 → 1.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -73
- package/README.md +5 -46
- package/build/src/api/context.d.ts +4 -6
- package/build/src/api/context.js +14 -12
- package/build/src/api/context.js.map +1 -1
- package/build/src/api/diag.d.ts +3 -7
- package/build/src/api/diag.js +3 -15
- package/build/src/api/diag.js.map +1 -1
- package/build/src/api/propagation.d.ts +2 -10
- package/build/src/api/propagation.js +5 -13
- package/build/src/api/propagation.js.map +1 -1
- package/build/src/api/trace.d.ts +3 -12
- package/build/src/api/trace.js +4 -12
- package/build/src/api/trace.js.map +1 -1
- package/build/{esm/baggage/types.d.ts → src/baggage/Baggage.d.ts} +2 -20
- package/build/{esm/baggage/types.js → src/baggage/Baggage.js} +3 -2
- package/build/src/baggage/Baggage.js.map +1 -0
- package/build/src/baggage/Entry.d.ts +20 -0
- package/build/src/baggage/{types.js → Entry.js} +1 -1
- package/build/src/baggage/Entry.js.map +1 -0
- package/build/src/baggage/{utils.d.ts → index.d.ts} +5 -2
- package/build/src/baggage/{utils.js → index.js} +16 -5
- package/build/src/baggage/index.js.map +1 -0
- package/build/{esm/baggage/internal/baggage-impl.d.ts → src/baggage/internal/baggage.d.ts} +3 -2
- package/build/src/baggage/internal/{baggage-impl.js → baggage.js} +1 -1
- package/build/src/baggage/internal/baggage.js.map +1 -0
- package/build/src/context/NoopContextManager.d.ts +1 -1
- package/build/src/context/NoopContextManager.js +8 -6
- package/build/src/context/NoopContextManager.js.map +1 -1
- package/build/src/context/context.d.ts +59 -0
- package/build/src/context/context.js +101 -7
- package/build/src/context/context.js.map +1 -1
- package/build/src/context/types.d.ts +2 -2
- package/build/src/diag/types.d.ts +0 -6
- package/build/src/index.d.ts +8 -2
- package/build/src/index.js +9 -4
- package/build/src/index.js.map +1 -1
- package/build/src/internal/global-utils.d.ts +1 -1
- package/build/src/internal/global-utils.js +5 -7
- package/build/src/internal/global-utils.js.map +1 -1
- package/build/src/propagation/NoopTextMapPropagator.d.ts +1 -0
- package/build/src/propagation/NoopTextMapPropagator.js +2 -1
- package/build/src/propagation/NoopTextMapPropagator.js.map +1 -1
- package/build/src/trace/Event.d.ts +9 -0
- package/build/{esm/diag/index.js → src/trace/Event.js} +3 -3
- package/build/src/trace/Event.js.map +1 -0
- package/build/{esm/trace/NonRecordingSpan.d.ts → src/trace/NoopSpan.d.ts} +4 -4
- package/build/src/trace/{NonRecordingSpan.js → NoopSpan.js} +17 -17
- package/build/src/trace/NoopSpan.js.map +1 -0
- package/build/src/trace/NoopTracer.d.ts +1 -3
- package/build/src/trace/NoopTracer.js +8 -32
- package/build/src/trace/NoopTracer.js.map +1 -1
- package/build/src/trace/NoopTracerProvider.d.ts +1 -0
- package/build/src/trace/NoopTracerProvider.js +3 -2
- package/build/src/trace/NoopTracerProvider.js.map +1 -1
- package/build/src/trace/ProxyTracer.d.ts +0 -1
- package/build/src/trace/ProxyTracer.js +1 -5
- package/build/src/trace/ProxyTracer.js.map +1 -1
- package/build/src/trace/ProxyTracerProvider.js +1 -2
- package/build/src/trace/ProxyTracerProvider.js.map +1 -1
- package/build/src/trace/TimedEvent.d.ts +10 -0
- package/build/{esm/context/types.js → src/trace/TimedEvent.js} +3 -2
- package/build/src/trace/TimedEvent.js.map +1 -0
- package/build/src/trace/link.d.ts +3 -3
- package/build/src/trace/link_context.d.ts +6 -0
- package/build/src/trace/link_context.js +18 -0
- package/build/src/trace/link_context.js.map +1 -0
- package/build/src/trace/span.d.ts +1 -1
- package/build/src/trace/spancontext-utils.d.ts +0 -8
- package/build/src/trace/spancontext-utils.js +1 -27
- package/build/src/trace/spancontext-utils.js.map +1 -1
- package/build/src/trace/tracer.d.ts +0 -46
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +1 -1
- package/build/src/version.js.map +1 -1
- package/package.json +15 -20
- package/build/esm/api/context.d.ts +0 -41
- package/build/esm/api/context.js +0 -89
- package/build/esm/api/context.js.map +0 -1
- package/build/esm/api/diag.d.ts +0 -38
- package/build/esm/api/diag.js +0 -89
- package/build/esm/api/diag.js.map +0 -1
- package/build/esm/api/propagation.d.ts +0 -48
- package/build/esm/api/propagation.js +0 -87
- package/build/esm/api/propagation.js.map +0 -1
- package/build/esm/api/trace.d.ts +0 -39
- package/build/esm/api/trace.js +0 -72
- package/build/esm/api/trace.js.map +0 -1
- package/build/esm/baggage/context-helpers.d.ts +0 -23
- package/build/esm/baggage/context-helpers.js +0 -47
- package/build/esm/baggage/context-helpers.js.map +0 -1
- package/build/esm/baggage/internal/baggage-impl.js +0 -61
- package/build/esm/baggage/internal/baggage-impl.js.map +0 -1
- package/build/esm/baggage/internal/symbol.d.ts +0 -5
- package/build/esm/baggage/internal/symbol.js +0 -20
- package/build/esm/baggage/internal/symbol.js.map +0 -1
- package/build/esm/baggage/types.js.map +0 -1
- package/build/esm/baggage/utils.d.ts +0 -15
- package/build/esm/baggage/utils.js +0 -46
- package/build/esm/baggage/utils.js.map +0 -1
- package/build/esm/common/Exception.d.ts +0 -26
- package/build/esm/common/Exception.js +0 -17
- package/build/esm/common/Exception.js.map +0 -1
- package/build/esm/common/Time.d.ts +0 -8
- package/build/esm/common/Time.js +0 -2
- package/build/esm/common/Time.js.map +0 -1
- package/build/esm/context/NoopContextManager.d.ts +0 -9
- package/build/esm/context/NoopContextManager.js +0 -47
- package/build/esm/context/NoopContextManager.js.map +0 -1
- package/build/esm/context/context.d.ts +0 -6
- package/build/esm/context/context.js +0 -52
- package/build/esm/context/context.js.map +0 -1
- package/build/esm/context/types.d.ts +0 -52
- package/build/esm/context/types.js.map +0 -1
- package/build/esm/diag/ComponentLogger.d.ts +0 -20
- package/build/esm/diag/ComponentLogger.js +0 -77
- package/build/esm/diag/ComponentLogger.js.map +0 -1
- package/build/esm/diag/consoleLogger.d.ts +0 -38
- package/build/esm/diag/consoleLogger.js +0 -54
- package/build/esm/diag/consoleLogger.js.map +0 -1
- package/build/esm/diag/index.d.ts +0 -3
- package/build/esm/diag/index.js.map +0 -1
- package/build/esm/diag/internal/logLevelLogger.d.ts +0 -3
- package/build/esm/diag/internal/logLevelLogger.js +0 -41
- package/build/esm/diag/internal/logLevelLogger.js.map +0 -1
- package/build/esm/diag/internal/noopLogger.d.ts +0 -8
- package/build/esm/diag/internal/noopLogger.js +0 -31
- package/build/esm/diag/internal/noopLogger.js.map +0 -1
- package/build/esm/diag/types.d.ts +0 -70
- package/build/esm/diag/types.js +0 -41
- package/build/esm/diag/types.js.map +0 -1
- package/build/esm/index.d.ts +0 -53
- package/build/esm/index.js +0 -63
- package/build/esm/index.js.map +0 -1
- package/build/esm/internal/global-utils.d.ts +0 -16
- package/build/esm/internal/global-utils.js +0 -60
- package/build/esm/internal/global-utils.js.map +0 -1
- package/build/esm/internal/semver.d.ts +0 -34
- package/build/esm/internal/semver.js +0 -106
- package/build/esm/internal/semver.js.map +0 -1
- package/build/esm/platform/browser/globalThis.d.ts +0 -3
- package/build/esm/platform/browser/globalThis.js +0 -19
- package/build/esm/platform/browser/globalThis.js.map +0 -1
- package/build/esm/platform/browser/index.d.ts +0 -2
- package/build/esm/platform/browser/index.js +0 -17
- package/build/esm/platform/browser/index.js.map +0 -1
- package/build/esm/platform/index.d.ts +0 -2
- package/build/esm/platform/index.js +0 -17
- package/build/esm/platform/index.js.map +0 -1
- package/build/esm/platform/node/globalThis.d.ts +0 -3
- package/build/esm/platform/node/globalThis.js +0 -19
- package/build/esm/platform/node/globalThis.js.map +0 -1
- package/build/esm/platform/node/index.d.ts +0 -2
- package/build/esm/platform/node/index.js +0 -17
- package/build/esm/platform/node/index.js.map +0 -1
- package/build/esm/propagation/NoopTextMapPropagator.d.ts +0 -13
- package/build/esm/propagation/NoopTextMapPropagator.js +0 -34
- package/build/esm/propagation/NoopTextMapPropagator.js.map +0 -1
- package/build/esm/propagation/TextMapPropagator.d.ts +0 -84
- package/build/esm/propagation/TextMapPropagator.js +0 -38
- package/build/esm/propagation/TextMapPropagator.js.map +0 -1
- package/build/esm/trace/NonRecordingSpan.js +0 -62
- package/build/esm/trace/NonRecordingSpan.js.map +0 -1
- package/build/esm/trace/NoopTracer.d.ts +0 -14
- package/build/esm/trace/NoopTracer.js +0 -74
- package/build/esm/trace/NoopTracer.js.map +0 -1
- package/build/esm/trace/NoopTracerProvider.d.ts +0 -12
- package/build/esm/trace/NoopTracerProvider.js +0 -32
- package/build/esm/trace/NoopTracerProvider.js.map +0 -1
- package/build/esm/trace/ProxyTracer.d.ts +0 -23
- package/build/esm/trace/ProxyTracer.js +0 -51
- package/build/esm/trace/ProxyTracer.js.map +0 -1
- package/build/esm/trace/ProxyTracerProvider.d.ts +0 -24
- package/build/esm/trace/ProxyTracerProvider.js +0 -54
- package/build/esm/trace/ProxyTracerProvider.js.map +0 -1
- package/build/esm/trace/Sampler.d.ts +0 -30
- package/build/esm/trace/Sampler.js +0 -17
- package/build/esm/trace/Sampler.js.map +0 -1
- package/build/esm/trace/SamplingResult.d.ts +0 -39
- package/build/esm/trace/SamplingResult.js +0 -38
- package/build/esm/trace/SamplingResult.js.map +0 -1
- package/build/esm/trace/SpanOptions.d.ts +0 -23
- package/build/esm/trace/SpanOptions.js +0 -17
- package/build/esm/trace/SpanOptions.js.map +0 -1
- package/build/esm/trace/attributes.d.ts +0 -10
- package/build/esm/trace/attributes.js +0 -17
- package/build/esm/trace/attributes.js.map +0 -1
- package/build/esm/trace/context-utils.d.ts +0 -37
- package/build/esm/trace/context-utils.js +0 -66
- package/build/esm/trace/context-utils.js.map +0 -1
- package/build/esm/trace/link.d.ts +0 -24
- package/build/esm/trace/link.js +0 -17
- package/build/esm/trace/link.js.map +0 -1
- package/build/esm/trace/span.d.ts +0 -101
- package/build/esm/trace/span.js +0 -17
- package/build/esm/trace/span.js.map +0 -1
- package/build/esm/trace/span_context.d.ts +0 -53
- package/build/esm/trace/span_context.js +0 -17
- package/build/esm/trace/span_context.js.map +0 -1
- package/build/esm/trace/span_kind.d.ts +0 -27
- package/build/esm/trace/span_kind.js +0 -43
- package/build/esm/trace/span_kind.js.map +0 -1
- package/build/esm/trace/spancontext-utils.d.ts +0 -20
- package/build/esm/trace/spancontext-utils.js +0 -49
- package/build/esm/trace/spancontext-utils.js.map +0 -1
- package/build/esm/trace/status.d.ts +0 -25
- package/build/esm/trace/status.js +0 -20
- package/build/esm/trace/status.js.map +0 -1
- package/build/esm/trace/trace_flags.d.ts +0 -7
- package/build/esm/trace/trace_flags.js +0 -23
- package/build/esm/trace/trace_flags.js.map +0 -1
- package/build/esm/trace/trace_state.d.ts +0 -38
- package/build/esm/trace/trace_state.js +0 -17
- package/build/esm/trace/trace_state.js.map +0 -1
- package/build/esm/trace/tracer.d.ts +0 -70
- package/build/esm/trace/tracer.js +0 -17
- package/build/esm/trace/tracer.js.map +0 -1
- package/build/esm/trace/tracer_provider.d.ts +0 -19
- package/build/esm/trace/tracer_provider.js +0 -17
- package/build/esm/trace/tracer_provider.js.map +0 -1
- package/build/esm/version.d.ts +0 -2
- package/build/esm/version.js +0 -18
- package/build/esm/version.js.map +0 -1
- package/build/src/baggage/context-helpers.d.ts +0 -23
- package/build/src/baggage/context-helpers.js +0 -53
- package/build/src/baggage/context-helpers.js.map +0 -1
- package/build/src/baggage/internal/baggage-impl.d.ts +0 -12
- package/build/src/baggage/internal/baggage-impl.js.map +0 -1
- package/build/src/baggage/types.d.ts +0 -60
- package/build/src/baggage/types.js.map +0 -1
- package/build/src/baggage/utils.js.map +0 -1
- package/build/src/diag/ComponentLogger.d.ts +0 -20
- package/build/src/diag/ComponentLogger.js +0 -80
- package/build/src/diag/ComponentLogger.js.map +0 -1
- package/build/src/trace/NonRecordingSpan.d.ts +0 -25
- package/build/src/trace/NonRecordingSpan.js.map +0 -1
- package/build/src/trace/context-utils.d.ts +0 -37
- package/build/src/trace/context-utils.js +0 -74
- package/build/src/trace/context-utils.js.map +0 -1
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { TimeInput } from '../common/Time';
|
|
2
|
-
import { SpanAttributes } from './attributes';
|
|
3
|
-
import { Link } from './link';
|
|
4
|
-
import { SpanKind } from './span_kind';
|
|
5
|
-
/**
|
|
6
|
-
* Options needed for span creation
|
|
7
|
-
*/
|
|
8
|
-
export interface SpanOptions {
|
|
9
|
-
/**
|
|
10
|
-
* The SpanKind of a span
|
|
11
|
-
* @default {@link SpanKind.INTERNAL}
|
|
12
|
-
*/
|
|
13
|
-
kind?: SpanKind;
|
|
14
|
-
/** A span's attributes */
|
|
15
|
-
attributes?: SpanAttributes;
|
|
16
|
-
/** {@link Link}s span to other spans */
|
|
17
|
-
links?: Link[];
|
|
18
|
-
/** A manually specified start time for the created `Span` object. */
|
|
19
|
-
startTime?: TimeInput;
|
|
20
|
-
/** The new span should be a root span. (Ignore parent from context). */
|
|
21
|
-
root?: boolean;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=SpanOptions.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=SpanOptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SpanOptions.js","sourceRoot":"","sources":["../../../src/trace/SpanOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface SpanAttributes {
|
|
2
|
-
[attributeKey: string]: SpanAttributeValue | undefined;
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* Attribute values may be any non-nullish primitive value except an object.
|
|
6
|
-
*
|
|
7
|
-
* null or undefined attribute values are invalid and will result in undefined behavior.
|
|
8
|
-
*/
|
|
9
|
-
export declare type SpanAttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
|
|
10
|
-
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=attributes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../../src/trace/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Context } from '../context/types';
|
|
2
|
-
import { Span } from './span';
|
|
3
|
-
import { SpanContext } from './span_context';
|
|
4
|
-
/**
|
|
5
|
-
* Return the span if one exists
|
|
6
|
-
*
|
|
7
|
-
* @param context context to get span from
|
|
8
|
-
*/
|
|
9
|
-
export 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
|
-
*/
|
|
16
|
-
export 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
|
-
*/
|
|
22
|
-
export 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
|
-
*/
|
|
30
|
-
export 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
|
-
*/
|
|
36
|
-
export declare function getSpanContext(context: Context): SpanContext | undefined;
|
|
37
|
-
//# sourceMappingURL=context-utils.d.ts.map
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { createContextKey } from '../context/context';
|
|
17
|
-
import { NonRecordingSpan } from './NonRecordingSpan';
|
|
18
|
-
/**
|
|
19
|
-
* span key
|
|
20
|
-
*/
|
|
21
|
-
var SPAN_KEY = createContextKey('OpenTelemetry Context Key SPAN');
|
|
22
|
-
/**
|
|
23
|
-
* Return the span if one exists
|
|
24
|
-
*
|
|
25
|
-
* @param context context to get span from
|
|
26
|
-
*/
|
|
27
|
-
export function getSpan(context) {
|
|
28
|
-
return context.getValue(SPAN_KEY) || undefined;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Set the span on a context
|
|
32
|
-
*
|
|
33
|
-
* @param context context to use as parent
|
|
34
|
-
* @param span span to set active
|
|
35
|
-
*/
|
|
36
|
-
export function setSpan(context, span) {
|
|
37
|
-
return context.setValue(SPAN_KEY, span);
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Remove current span stored in the context
|
|
41
|
-
*
|
|
42
|
-
* @param context context to delete span from
|
|
43
|
-
*/
|
|
44
|
-
export function deleteSpan(context) {
|
|
45
|
-
return context.deleteValue(SPAN_KEY);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Wrap span context in a NoopSpan and set as span in a new
|
|
49
|
-
* context
|
|
50
|
-
*
|
|
51
|
-
* @param context context to set active span on
|
|
52
|
-
* @param spanContext span context to be wrapped
|
|
53
|
-
*/
|
|
54
|
-
export function setSpanContext(context, spanContext) {
|
|
55
|
-
return setSpan(context, new NonRecordingSpan(spanContext));
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Get the span context of the span if it exists.
|
|
59
|
-
*
|
|
60
|
-
* @param context context to get values from
|
|
61
|
-
*/
|
|
62
|
-
export function getSpanContext(context) {
|
|
63
|
-
var _a;
|
|
64
|
-
return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=context-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-utils.js","sourceRoot":"","sources":["../../../src/trace/context-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAItD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,IAAM,QAAQ,GAAG,gBAAgB,CAAC,gCAAgC,CAAC,CAAC;AAEpE;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,OAAgB;IACtC,OAAQ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU,IAAI,SAAS,CAAC;AAC3D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,OAAgB,EAAE,IAAU;IAClD,OAAO,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC1C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,OAAgB;IACzC,OAAO,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAgB,EAChB,WAAwB;IAExB,OAAO,OAAO,CAAC,OAAO,EAAE,IAAI,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;AAC7D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgB;;IAC7C,OAAO,MAAA,OAAO,CAAC,OAAO,CAAC,0CAAE,WAAW,EAAE,CAAC;AACzC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { SpanAttributes } from './attributes';
|
|
2
|
-
import { SpanContext } from './span_context';
|
|
3
|
-
/**
|
|
4
|
-
* A pointer from the current {@link Span} to another span in the same trace or
|
|
5
|
-
* in a different trace.
|
|
6
|
-
* Few examples of Link usage.
|
|
7
|
-
* 1. Batch Processing: A batch of elements may contain elements associated
|
|
8
|
-
* with one or more traces/spans. Since there can only be one parent
|
|
9
|
-
* SpanContext, Link is used to keep reference to SpanContext of all
|
|
10
|
-
* elements in the batch.
|
|
11
|
-
* 2. Public Endpoint: A SpanContext in incoming client request on a public
|
|
12
|
-
* endpoint is untrusted from service provider perspective. In such case it
|
|
13
|
-
* is advisable to start a new trace with appropriate sampling decision.
|
|
14
|
-
* However, it is desirable to associate incoming SpanContext to new trace
|
|
15
|
-
* initiated on service provider side so two traces (from Client and from
|
|
16
|
-
* Service Provider) can be correlated.
|
|
17
|
-
*/
|
|
18
|
-
export interface Link {
|
|
19
|
-
/** The {@link SpanContext} of a linked span. */
|
|
20
|
-
context: SpanContext;
|
|
21
|
-
/** A set of {@link SpanAttributes} on the link. */
|
|
22
|
-
attributes?: SpanAttributes;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=link.d.ts.map
|
package/build/esm/trace/link.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/trace/link.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { Exception } from '../common/Exception';
|
|
2
|
-
import { TimeInput } from '../common/Time';
|
|
3
|
-
import { SpanAttributes, SpanAttributeValue } from './attributes';
|
|
4
|
-
import { SpanContext } from './span_context';
|
|
5
|
-
import { SpanStatus } from './status';
|
|
6
|
-
/**
|
|
7
|
-
* An interface that represents a span. A span represents a single operation
|
|
8
|
-
* within a trace. Examples of span might include remote procedure calls or a
|
|
9
|
-
* in-process function calls to sub-components. A Trace has a single, top-level
|
|
10
|
-
* "root" Span that in turn may have zero or more child Spans, which in turn
|
|
11
|
-
* may have children.
|
|
12
|
-
*
|
|
13
|
-
* Spans are created by the {@link Tracer.startSpan} method.
|
|
14
|
-
*/
|
|
15
|
-
export interface Span {
|
|
16
|
-
/**
|
|
17
|
-
* Returns the {@link SpanContext} object associated with this Span.
|
|
18
|
-
*
|
|
19
|
-
* Get an immutable, serializable identifier for this span that can be used
|
|
20
|
-
* to create new child spans. Returned SpanContext is usable even after the
|
|
21
|
-
* span ends.
|
|
22
|
-
*
|
|
23
|
-
* @returns the SpanContext object associated with this Span.
|
|
24
|
-
*/
|
|
25
|
-
spanContext(): SpanContext;
|
|
26
|
-
/**
|
|
27
|
-
* Sets an attribute to the span.
|
|
28
|
-
*
|
|
29
|
-
* Sets a single Attribute with the key and value passed as arguments.
|
|
30
|
-
*
|
|
31
|
-
* @param key the key for this attribute.
|
|
32
|
-
* @param value the value for this attribute. Setting a value null or
|
|
33
|
-
* undefined is invalid and will result in undefined behavior.
|
|
34
|
-
*/
|
|
35
|
-
setAttribute(key: string, value: SpanAttributeValue): this;
|
|
36
|
-
/**
|
|
37
|
-
* Sets attributes to the span.
|
|
38
|
-
*
|
|
39
|
-
* @param attributes the attributes that will be added.
|
|
40
|
-
* null or undefined attribute values
|
|
41
|
-
* are invalid and will result in undefined behavior.
|
|
42
|
-
*/
|
|
43
|
-
setAttributes(attributes: SpanAttributes): this;
|
|
44
|
-
/**
|
|
45
|
-
* Adds an event to the Span.
|
|
46
|
-
*
|
|
47
|
-
* @param name the name of the event.
|
|
48
|
-
* @param [attributesOrStartTime] the attributes that will be added; these are
|
|
49
|
-
* associated with this event. Can be also a start time
|
|
50
|
-
* if type is {@type TimeInput} and 3rd param is undefined
|
|
51
|
-
* @param [startTime] start time of the event.
|
|
52
|
-
*/
|
|
53
|
-
addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this;
|
|
54
|
-
/**
|
|
55
|
-
* Sets a status to the span. If used, this will override the default Span
|
|
56
|
-
* status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value
|
|
57
|
-
* of previous calls to SetStatus on the Span.
|
|
58
|
-
*
|
|
59
|
-
* @param status the SpanStatus to set.
|
|
60
|
-
*/
|
|
61
|
-
setStatus(status: SpanStatus): this;
|
|
62
|
-
/**
|
|
63
|
-
* Updates the Span name.
|
|
64
|
-
*
|
|
65
|
-
* This will override the name provided via {@link Tracer.startSpan}.
|
|
66
|
-
*
|
|
67
|
-
* Upon this update, any sampling behavior based on Span name will depend on
|
|
68
|
-
* the implementation.
|
|
69
|
-
*
|
|
70
|
-
* @param name the Span name.
|
|
71
|
-
*/
|
|
72
|
-
updateName(name: string): this;
|
|
73
|
-
/**
|
|
74
|
-
* Marks the end of Span execution.
|
|
75
|
-
*
|
|
76
|
-
* Call to End of a Span MUST not have any effects on child spans. Those may
|
|
77
|
-
* still be running and can be ended later.
|
|
78
|
-
*
|
|
79
|
-
* Do not return `this`. The Span generally should not be used after it
|
|
80
|
-
* is ended so chaining is not desired in this context.
|
|
81
|
-
*
|
|
82
|
-
* @param [endTime] the time to set as Span's end time. If not provided,
|
|
83
|
-
* use the current time as the span's end time.
|
|
84
|
-
*/
|
|
85
|
-
end(endTime?: TimeInput): void;
|
|
86
|
-
/**
|
|
87
|
-
* Returns the flag whether this span will be recorded.
|
|
88
|
-
*
|
|
89
|
-
* @returns true if this Span is active and recording information like events
|
|
90
|
-
* with the `AddEvent` operation and attributes using `setAttributes`.
|
|
91
|
-
*/
|
|
92
|
-
isRecording(): boolean;
|
|
93
|
-
/**
|
|
94
|
-
* Sets exception as a span event
|
|
95
|
-
* @param exception the exception the only accepted values are string or Error
|
|
96
|
-
* @param [time] the time to set as Span's event time. If not provided,
|
|
97
|
-
* use the current time.
|
|
98
|
-
*/
|
|
99
|
-
recordException(exception: Exception, time?: TimeInput): void;
|
|
100
|
-
}
|
|
101
|
-
//# sourceMappingURL=span.d.ts.map
|
package/build/esm/trace/span.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=span.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"span.js","sourceRoot":"","sources":["../../../src/trace/span.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { TraceState } from './trace_state';
|
|
2
|
-
/**
|
|
3
|
-
* A SpanContext represents the portion of a {@link Span} which must be
|
|
4
|
-
* serialized and propagated along side of a {@link Baggage}.
|
|
5
|
-
*/
|
|
6
|
-
export interface SpanContext {
|
|
7
|
-
/**
|
|
8
|
-
* The ID of the trace that this span belongs to. It is worldwide unique
|
|
9
|
-
* with practically sufficient probability by being made as 16 randomly
|
|
10
|
-
* generated bytes, encoded as a 32 lowercase hex characters corresponding to
|
|
11
|
-
* 128 bits.
|
|
12
|
-
*/
|
|
13
|
-
traceId: string;
|
|
14
|
-
/**
|
|
15
|
-
* The ID of the Span. It is globally unique with practically sufficient
|
|
16
|
-
* probability by being made as 8 randomly generated bytes, encoded as a 16
|
|
17
|
-
* lowercase hex characters corresponding to 64 bits.
|
|
18
|
-
*/
|
|
19
|
-
spanId: string;
|
|
20
|
-
/**
|
|
21
|
-
* Only true if the SpanContext was propagated from a remote parent.
|
|
22
|
-
*/
|
|
23
|
-
isRemote?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Trace flags to propagate.
|
|
26
|
-
*
|
|
27
|
-
* It is represented as 1 byte (bitmap). Bit to represent whether trace is
|
|
28
|
-
* sampled or not. When set, the least significant bit documents that the
|
|
29
|
-
* caller may have recorded trace data. A caller who does not record trace
|
|
30
|
-
* data out-of-band leaves this flag unset.
|
|
31
|
-
*
|
|
32
|
-
* see {@link TraceFlags} for valid flag values.
|
|
33
|
-
*/
|
|
34
|
-
traceFlags: number;
|
|
35
|
-
/**
|
|
36
|
-
* Tracing-system-specific info to propagate.
|
|
37
|
-
*
|
|
38
|
-
* The tracestate field value is a `list` as defined below. The `list` is a
|
|
39
|
-
* series of `list-members` separated by commas `,`, and a list-member is a
|
|
40
|
-
* key/value pair separated by an equals sign `=`. Spaces and horizontal tabs
|
|
41
|
-
* surrounding `list-members` are ignored. There can be a maximum of 32
|
|
42
|
-
* `list-members` in a `list`.
|
|
43
|
-
* More Info: https://www.w3.org/TR/trace-context/#tracestate-field
|
|
44
|
-
*
|
|
45
|
-
* Examples:
|
|
46
|
-
* Single tracing system (generic format):
|
|
47
|
-
* tracestate: rojo=00f067aa0ba902b7
|
|
48
|
-
* Multiple tracing systems (with different formatting):
|
|
49
|
-
* tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE
|
|
50
|
-
*/
|
|
51
|
-
traceState?: TraceState;
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=span_context.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=span_context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"span_context.js","sourceRoot":"","sources":["../../../src/trace/span_context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare enum SpanKind {
|
|
2
|
-
/** Default value. Indicates that the span is used internally. */
|
|
3
|
-
INTERNAL = 0,
|
|
4
|
-
/**
|
|
5
|
-
* Indicates that the span covers server-side handling of an RPC or other
|
|
6
|
-
* remote request.
|
|
7
|
-
*/
|
|
8
|
-
SERVER = 1,
|
|
9
|
-
/**
|
|
10
|
-
* Indicates that the span covers the client-side wrapper around an RPC or
|
|
11
|
-
* other remote request.
|
|
12
|
-
*/
|
|
13
|
-
CLIENT = 2,
|
|
14
|
-
/**
|
|
15
|
-
* Indicates that the span describes producer sending a message to a
|
|
16
|
-
* broker. Unlike client and server, there is no direct critical path latency
|
|
17
|
-
* relationship between producer and consumer spans.
|
|
18
|
-
*/
|
|
19
|
-
PRODUCER = 3,
|
|
20
|
-
/**
|
|
21
|
-
* Indicates that the span describes consumer receiving a message from a
|
|
22
|
-
* broker. Unlike client and server, there is no direct critical path latency
|
|
23
|
-
* relationship between producer and consumer spans.
|
|
24
|
-
*/
|
|
25
|
-
CONSUMER = 4
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=span_kind.d.ts.map
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export var SpanKind;
|
|
17
|
-
(function (SpanKind) {
|
|
18
|
-
/** Default value. Indicates that the span is used internally. */
|
|
19
|
-
SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL";
|
|
20
|
-
/**
|
|
21
|
-
* Indicates that the span covers server-side handling of an RPC or other
|
|
22
|
-
* remote request.
|
|
23
|
-
*/
|
|
24
|
-
SpanKind[SpanKind["SERVER"] = 1] = "SERVER";
|
|
25
|
-
/**
|
|
26
|
-
* Indicates that the span covers the client-side wrapper around an RPC or
|
|
27
|
-
* other remote request.
|
|
28
|
-
*/
|
|
29
|
-
SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT";
|
|
30
|
-
/**
|
|
31
|
-
* Indicates that the span describes producer sending a message to a
|
|
32
|
-
* broker. Unlike client and server, there is no direct critical path latency
|
|
33
|
-
* relationship between producer and consumer spans.
|
|
34
|
-
*/
|
|
35
|
-
SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER";
|
|
36
|
-
/**
|
|
37
|
-
* Indicates that the span describes consumer receiving a message from a
|
|
38
|
-
* broker. Unlike client and server, there is no direct critical path latency
|
|
39
|
-
* relationship between producer and consumer spans.
|
|
40
|
-
*/
|
|
41
|
-
SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER";
|
|
42
|
-
})(SpanKind || (SpanKind = {}));
|
|
43
|
-
//# sourceMappingURL=span_kind.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"span_kind.js","sourceRoot":"","sources":["../../../src/trace/span_kind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAN,IAAY,QA6BX;AA7BD,WAAY,QAAQ;IAClB,iEAAiE;IACjE,+CAAY,CAAA;IAEZ;;;OAGG;IACH,2CAAU,CAAA;IAEV;;;OAGG;IACH,2CAAU,CAAA;IAEV;;;;OAIG;IACH,+CAAY,CAAA;IAEZ;;;;OAIG;IACH,+CAAY,CAAA;AACd,CAAC,EA7BW,QAAQ,KAAR,QAAQ,QA6BnB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Span } from './span';
|
|
2
|
-
import { SpanContext } from './span_context';
|
|
3
|
-
export declare const INVALID_SPANID = "0000000000000000";
|
|
4
|
-
export declare const INVALID_TRACEID = "00000000000000000000000000000000";
|
|
5
|
-
export declare const INVALID_SPAN_CONTEXT: SpanContext;
|
|
6
|
-
export declare function isValidTraceId(traceId: string): boolean;
|
|
7
|
-
export declare function isValidSpanId(spanId: string): boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Returns true if this {@link SpanContext} is valid.
|
|
10
|
-
* @return true if this {@link SpanContext} is valid.
|
|
11
|
-
*/
|
|
12
|
-
export declare function isSpanContextValid(spanContext: SpanContext): boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Wrap the given {@link SpanContext} in a new non-recording {@link Span}
|
|
15
|
-
*
|
|
16
|
-
* @param spanContext span context to be wrapped
|
|
17
|
-
* @returns a new non-recording {@link Span} with the provided context
|
|
18
|
-
*/
|
|
19
|
-
export declare function wrapSpanContext(spanContext: SpanContext): Span;
|
|
20
|
-
//# sourceMappingURL=spancontext-utils.d.ts.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { NonRecordingSpan } from './NonRecordingSpan';
|
|
17
|
-
import { TraceFlags } from './trace_flags';
|
|
18
|
-
var VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;
|
|
19
|
-
var VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;
|
|
20
|
-
export var INVALID_SPANID = '0000000000000000';
|
|
21
|
-
export var INVALID_TRACEID = '00000000000000000000000000000000';
|
|
22
|
-
export var INVALID_SPAN_CONTEXT = {
|
|
23
|
-
traceId: INVALID_TRACEID,
|
|
24
|
-
spanId: INVALID_SPANID,
|
|
25
|
-
traceFlags: TraceFlags.NONE,
|
|
26
|
-
};
|
|
27
|
-
export function isValidTraceId(traceId) {
|
|
28
|
-
return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;
|
|
29
|
-
}
|
|
30
|
-
export function isValidSpanId(spanId) {
|
|
31
|
-
return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Returns true if this {@link SpanContext} is valid.
|
|
35
|
-
* @return true if this {@link SpanContext} is valid.
|
|
36
|
-
*/
|
|
37
|
-
export function isSpanContextValid(spanContext) {
|
|
38
|
-
return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Wrap the given {@link SpanContext} in a new non-recording {@link Span}
|
|
42
|
-
*
|
|
43
|
-
* @param spanContext span context to be wrapped
|
|
44
|
-
* @returns a new non-recording {@link Span} with the provided context
|
|
45
|
-
*/
|
|
46
|
-
export function wrapSpanContext(spanContext) {
|
|
47
|
-
return new NonRecordingSpan(spanContext);
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=spancontext-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spancontext-utils.js","sourceRoot":"","sources":["../../../src/trace/spancontext-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,IAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAChD,IAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAC7C,MAAM,CAAC,IAAM,cAAc,GAAG,kBAAkB,CAAC;AACjD,MAAM,CAAC,IAAM,eAAe,GAAG,kCAAkC,CAAC;AAClE,MAAM,CAAC,IAAM,oBAAoB,GAAgB;IAC/C,OAAO,EAAE,eAAe;IACxB,MAAM,EAAE,cAAc;IACtB,UAAU,EAAE,UAAU,CAAC,IAAI;CAC5B,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,OAAO,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,OAAO,KAAK,eAAe,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,OAAO,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,MAAM,KAAK,cAAc,CAAC;AACtE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAwB;IACzD,OAAO,CACL,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,WAAW,CAAC,MAAM,CAAC,CACzE,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,WAAwB;IACtD,OAAO,IAAI,gBAAgB,CAAC,WAAW,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface SpanStatus {
|
|
2
|
-
/** The status code of this message. */
|
|
3
|
-
code: SpanStatusCode;
|
|
4
|
-
/** A developer-facing error message. */
|
|
5
|
-
message?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* An enumeration of status codes.
|
|
9
|
-
*/
|
|
10
|
-
export declare enum SpanStatusCode {
|
|
11
|
-
/**
|
|
12
|
-
* The default status.
|
|
13
|
-
*/
|
|
14
|
-
UNSET = 0,
|
|
15
|
-
/**
|
|
16
|
-
* The operation has been validated by an Application developer or
|
|
17
|
-
* Operator to have completed successfully.
|
|
18
|
-
*/
|
|
19
|
-
OK = 1,
|
|
20
|
-
/**
|
|
21
|
-
* The operation contains an error.
|
|
22
|
-
*/
|
|
23
|
-
ERROR = 2
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=status.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An enumeration of status codes.
|
|
3
|
-
*/
|
|
4
|
-
export var SpanStatusCode;
|
|
5
|
-
(function (SpanStatusCode) {
|
|
6
|
-
/**
|
|
7
|
-
* The default status.
|
|
8
|
-
*/
|
|
9
|
-
SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET";
|
|
10
|
-
/**
|
|
11
|
-
* The operation has been validated by an Application developer or
|
|
12
|
-
* Operator to have completed successfully.
|
|
13
|
-
*/
|
|
14
|
-
SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK";
|
|
15
|
-
/**
|
|
16
|
-
* The operation contains an error.
|
|
17
|
-
*/
|
|
18
|
-
SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR";
|
|
19
|
-
})(SpanStatusCode || (SpanStatusCode = {}));
|
|
20
|
-
//# sourceMappingURL=status.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/trace/status.ts"],"names":[],"mappings":"AAsBA;;GAEG;AACH,MAAM,CAAN,IAAY,cAcX;AAdD,WAAY,cAAc;IACxB;;OAEG;IACH,qDAAS,CAAA;IACT;;;OAGG;IACH,+CAAM,CAAA;IACN;;OAEG;IACH,qDAAS,CAAA;AACX,CAAC,EAdW,cAAc,KAAd,cAAc,QAczB"}
|