@opentelemetry/api 0.8.3 → 0.10.2
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/README.md +3 -0
- package/build/src/api/context.d.ts +0 -15
- package/build/src/api/context.js +28 -24
- package/build/src/api/context.js.map +1 -0
- package/build/src/api/global-utils.d.ts +0 -15
- package/build/src/api/global-utils.js +7 -4
- package/build/src/api/global-utils.js.map +1 -0
- package/build/src/api/metrics.d.ts +0 -15
- package/build/src/api/metrics.js +22 -19
- package/build/src/api/metrics.js.map +1 -0
- package/build/src/api/propagation.d.ts +0 -15
- package/build/src/api/propagation.js +32 -25
- package/build/src/api/propagation.js.map +1 -0
- package/build/src/api/trace.d.ts +0 -15
- package/build/src/api/trace.js +22 -19
- package/build/src/api/trace.js.map +1 -0
- package/build/src/common/Logger.d.ts +0 -15
- package/build/src/common/Logger.js +2 -2
- package/build/src/common/Logger.js.map +1 -0
- package/build/src/common/Time.d.ts +0 -16
- package/build/src/common/Time.js +0 -15
- package/build/src/common/Time.js.map +1 -0
- package/build/src/context/propagation/HttpTextPropagator.d.ts +0 -15
- package/build/src/context/propagation/HttpTextPropagator.js +2 -2
- package/build/src/context/propagation/HttpTextPropagator.js.map +1 -0
- package/build/src/context/propagation/NoopHttpTextPropagator.d.ts +0 -15
- package/build/src/context/propagation/NoopHttpTextPropagator.js +11 -7
- package/build/src/context/propagation/NoopHttpTextPropagator.js.map +1 -0
- package/build/src/context/propagation/getter.d.ts +0 -15
- package/build/src/context/propagation/getter.js +3 -2
- package/build/src/context/propagation/getter.js.map +1 -0
- package/build/src/context/propagation/setter.d.ts +0 -15
- package/build/src/context/propagation/setter.js +3 -2
- package/build/src/context/propagation/setter.js.map +1 -0
- package/build/src/correlation_context/CorrelationContext.d.ts +0 -15
- package/build/src/correlation_context/CorrelationContext.js +2 -2
- package/build/src/correlation_context/CorrelationContext.js.map +1 -0
- package/build/src/correlation_context/EntryValue.d.ts +0 -19
- package/build/src/correlation_context/EntryValue.js +1 -15
- package/build/src/correlation_context/EntryValue.js.map +1 -0
- package/build/src/index.d.ts +3 -16
- package/build/src/index.js +55 -23
- package/build/src/index.js.map +1 -0
- package/build/src/metrics/BatchObserverResult.d.ts +15 -0
- package/build/src/metrics/{MetricObservable.js → BatchObserverResult.js} +3 -3
- package/build/src/metrics/BatchObserverResult.js.map +1 -0
- package/build/src/metrics/BoundInstrument.d.ts +10 -21
- package/build/src/metrics/BoundInstrument.js +2 -2
- package/build/src/metrics/BoundInstrument.js.map +1 -0
- package/build/src/metrics/Meter.d.ts +35 -21
- package/build/src/metrics/Meter.js +2 -2
- package/build/src/metrics/Meter.js.map +1 -0
- package/build/src/metrics/MeterProvider.d.ts +0 -15
- package/build/src/metrics/MeterProvider.js +2 -2
- package/build/src/metrics/MeterProvider.js.map +1 -0
- package/build/src/metrics/Metric.d.ts +33 -33
- package/build/src/metrics/Metric.js +3 -2
- package/build/src/metrics/Metric.js.map +1 -0
- package/build/src/metrics/NoopMeter.d.ts +39 -28
- package/build/src/metrics/NoopMeter.js +126 -47
- package/build/src/metrics/NoopMeter.js.map +1 -0
- package/build/src/metrics/NoopMeterProvider.d.ts +0 -15
- package/build/src/metrics/NoopMeterProvider.js +11 -7
- package/build/src/metrics/NoopMeterProvider.js.map +1 -0
- package/build/src/metrics/Observation.d.ts +9 -0
- package/build/src/metrics/Observation.js +18 -0
- package/build/src/metrics/Observation.js.map +1 -0
- package/build/src/metrics/ObserverResult.d.ts +2 -18
- package/build/src/metrics/ObserverResult.js +2 -2
- package/build/src/metrics/ObserverResult.js.map +1 -0
- package/build/src/platform/browser/globalThis.d.ts +0 -15
- package/build/src/platform/browser/globalThis.js +3 -2
- package/build/src/platform/browser/globalThis.js.map +1 -0
- package/build/src/platform/browser/index.d.ts +0 -15
- package/build/src/platform/browser/index.js +13 -6
- package/build/src/platform/browser/index.js.map +1 -0
- package/build/src/platform/index.d.ts +0 -15
- package/build/src/platform/index.js +13 -6
- package/build/src/platform/index.js.map +1 -0
- package/build/src/platform/node/globalThis.d.ts +0 -15
- package/build/src/platform/node/globalThis.js +3 -2
- package/build/src/platform/node/globalThis.js.map +1 -0
- package/build/src/platform/node/index.d.ts +0 -15
- package/build/src/platform/node/index.js +13 -6
- package/build/src/platform/node/index.js.map +1 -0
- package/build/src/trace/Event.d.ts +0 -15
- package/build/src/trace/Event.js +2 -2
- package/build/src/trace/Event.js.map +1 -0
- package/build/src/trace/NoopSpan.d.ts +0 -15
- package/build/src/trace/NoopSpan.js +25 -22
- package/build/src/trace/NoopSpan.js.map +1 -0
- package/build/src/trace/NoopTracer.d.ts +0 -15
- package/build/src/trace/NoopTracer.js +17 -13
- package/build/src/trace/NoopTracer.js.map +1 -0
- package/build/src/trace/NoopTracerProvider.d.ts +0 -15
- package/build/src/trace/NoopTracerProvider.js +11 -7
- package/build/src/trace/NoopTracerProvider.js.map +1 -0
- package/build/src/trace/Sampler.d.ts +15 -19
- package/build/src/trace/Sampler.js +2 -2
- package/build/src/trace/Sampler.js.map +1 -0
- package/build/src/trace/SamplingResult.d.ts +39 -0
- package/build/src/trace/SamplingResult.js +41 -0
- package/build/src/trace/SamplingResult.js.map +1 -0
- package/build/src/trace/SpanOptions.d.ts +0 -15
- package/build/src/trace/SpanOptions.js +2 -2
- package/build/src/trace/SpanOptions.js.map +1 -0
- package/build/src/trace/TimedEvent.d.ts +0 -15
- package/build/src/trace/TimedEvent.js +2 -2
- package/build/src/trace/TimedEvent.js.map +1 -0
- package/build/src/trace/attributes.d.ts +0 -19
- package/build/src/trace/attributes.js +0 -15
- package/build/src/trace/attributes.js.map +1 -0
- package/build/src/trace/instrumentation/Plugin.d.ts +0 -15
- package/build/src/trace/instrumentation/Plugin.js +2 -2
- package/build/src/trace/instrumentation/Plugin.js.map +1 -0
- package/build/src/trace/link.d.ts +0 -15
- package/build/src/trace/link.js +2 -2
- package/build/src/trace/link.js.map +1 -0
- package/build/src/trace/link_context.d.ts +0 -15
- package/build/src/trace/link_context.js +2 -2
- package/build/src/trace/link_context.js.map +1 -0
- package/build/src/trace/span.d.ts +0 -15
- package/build/src/trace/span.js +2 -2
- package/build/src/trace/span.js.map +1 -0
- package/build/src/trace/span_context.d.ts +0 -15
- package/build/src/trace/span_context.js +2 -2
- package/build/src/trace/span_context.js.map +1 -0
- package/build/src/trace/span_kind.d.ts +0 -19
- package/build/src/trace/span_kind.js +4 -7
- package/build/src/trace/span_kind.js.map +1 -0
- package/build/src/trace/status.d.ts +0 -19
- package/build/src/trace/status.js +1 -15
- package/build/src/trace/status.js.map +1 -0
- package/build/src/trace/trace_flags.d.ts +0 -20
- package/build/src/trace/trace_flags.js +4 -8
- package/build/src/trace/trace_flags.js.map +1 -0
- package/build/src/trace/trace_state.d.ts +0 -20
- package/build/src/trace/trace_state.js +0 -15
- package/build/src/trace/trace_state.js.map +1 -0
- package/build/src/trace/tracer.d.ts +1 -16
- package/build/src/trace/tracer.js +2 -2
- package/build/src/trace/tracer.js.map +1 -0
- package/build/src/trace/tracer_provider.d.ts +0 -15
- package/build/src/trace/tracer_provider.js +2 -2
- package/build/src/trace/tracer_provider.js.map +1 -0
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +3 -2
- package/build/src/version.js.map +1 -0
- package/package.json +24 -22
- package/build/src/metrics/MetricObservable.d.ts +0 -36
|
@@ -1,22 +1,7 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2019, 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
1
|
import { CorrelationContext } from '../correlation_context/CorrelationContext';
|
|
17
2
|
import { SpanContext } from '../trace/span_context';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
3
|
+
import { BoundBaseObserver, BoundCounter, BoundValueRecorder } from './BoundInstrument';
|
|
4
|
+
import { Logger } from '../common/Logger';
|
|
20
5
|
/**
|
|
21
6
|
* Options needed for metric creation
|
|
22
7
|
*/
|
|
@@ -33,8 +18,6 @@ export interface MetricOptions {
|
|
|
33
18
|
* @default '1'
|
|
34
19
|
*/
|
|
35
20
|
unit?: string;
|
|
36
|
-
/** The list of label keys for the Metric. */
|
|
37
|
-
labelKeys?: string[];
|
|
38
21
|
/** The map of constant labels for the Metric. */
|
|
39
22
|
constantLabels?: Map<string, string>;
|
|
40
23
|
/**
|
|
@@ -42,10 +25,6 @@ export interface MetricOptions {
|
|
|
42
25
|
* @default false
|
|
43
26
|
*/
|
|
44
27
|
disabled?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Asserts that this metric may only increase (e.g. time spent).
|
|
47
|
-
*/
|
|
48
|
-
monotonic?: boolean;
|
|
49
28
|
/**
|
|
50
29
|
* (Measure only, default true) Asserts that this metric will only accept
|
|
51
30
|
* non-negative values (e.g. disk usage).
|
|
@@ -56,6 +35,16 @@ export interface MetricOptions {
|
|
|
56
35
|
* @default {@link ValueType.DOUBLE}
|
|
57
36
|
*/
|
|
58
37
|
valueType?: ValueType;
|
|
38
|
+
/**
|
|
39
|
+
* User provided logger.
|
|
40
|
+
*/
|
|
41
|
+
logger?: Logger;
|
|
42
|
+
}
|
|
43
|
+
export interface BatchMetricOptions extends MetricOptions {
|
|
44
|
+
/**
|
|
45
|
+
* Indicates how long the batch metric should wait to update before cancel
|
|
46
|
+
*/
|
|
47
|
+
maxTimeoutUpdateMS?: number;
|
|
59
48
|
}
|
|
60
49
|
/** The Type of value. It describes how the data is reported. */
|
|
61
50
|
export declare enum ValueType {
|
|
@@ -112,24 +101,35 @@ export interface Counter extends UnboundMetric<BoundCounter> {
|
|
|
112
101
|
*/
|
|
113
102
|
add(value: number, labels?: Labels): void;
|
|
114
103
|
}
|
|
115
|
-
export interface
|
|
104
|
+
export interface UpDownCounter extends UnboundMetric<BoundCounter> {
|
|
105
|
+
/**
|
|
106
|
+
* Adds the given value to the current value. Values can be negative.
|
|
107
|
+
*/
|
|
108
|
+
add(value: number, labels?: Labels): void;
|
|
109
|
+
}
|
|
110
|
+
export interface ValueRecorder extends UnboundMetric<BoundValueRecorder> {
|
|
116
111
|
/**
|
|
117
|
-
* Records the given value to this
|
|
112
|
+
* Records the given value to this value recorder.
|
|
118
113
|
*/
|
|
119
114
|
record(value: number, labels?: Labels): void;
|
|
120
115
|
record(value: number, labels: Labels, correlationContext: CorrelationContext): void;
|
|
121
116
|
record(value: number, labels: Labels, correlationContext: CorrelationContext, spanContext: SpanContext): void;
|
|
122
117
|
}
|
|
123
118
|
/** Base interface for the Observer metrics. */
|
|
124
|
-
export interface
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
* for values
|
|
130
|
-
*/
|
|
131
|
-
setCallback(callback: (observerResult: ObserverResult) => void): void;
|
|
119
|
+
export interface BaseObserver extends UnboundMetric<BoundBaseObserver> {
|
|
120
|
+
observation: (value: number) => {
|
|
121
|
+
value: number;
|
|
122
|
+
observer: BaseObserver;
|
|
123
|
+
};
|
|
132
124
|
}
|
|
125
|
+
/** Base interface for the ValueObserver metrics. */
|
|
126
|
+
export declare type ValueObserver = BaseObserver;
|
|
127
|
+
/** Base interface for the UpDownSumObserver metrics. */
|
|
128
|
+
export declare type UpDownSumObserver = BaseObserver;
|
|
129
|
+
/** Base interface for the SumObserver metrics. */
|
|
130
|
+
export declare type SumObserver = BaseObserver;
|
|
131
|
+
/** Base interface for the Batch Observer metrics. */
|
|
132
|
+
export declare type BatchObserver = Metric;
|
|
133
133
|
/**
|
|
134
134
|
* key-value pairs passed by the user.
|
|
135
135
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* Copyright
|
|
2
|
+
/*
|
|
3
|
+
* Copyright The OpenTelemetry Authors
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ValueType = void 0;
|
|
18
19
|
/** The Type of value. It describes how the data is reported. */
|
|
19
20
|
var ValueType;
|
|
20
21
|
(function (ValueType) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Metric.js","sourceRoot":"","sources":["../../../src/metrics/Metric.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAgEH,gEAAgE;AAChE,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,uCAAG,CAAA;IACH,6CAAM,CAAA;AACR,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"}
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright 2019, 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
|
-
*/
|
|
1
|
+
import { BatchObserverResult } from './BatchObserverResult';
|
|
16
2
|
import { Meter } from './Meter';
|
|
17
|
-
import { MetricOptions, UnboundMetric, Labels, Counter,
|
|
18
|
-
import {
|
|
3
|
+
import { MetricOptions, UnboundMetric, Labels, Counter, ValueRecorder, ValueObserver, BatchObserver, UpDownCounter, BaseObserver } from './Metric';
|
|
4
|
+
import { BoundValueRecorder, BoundCounter, BoundBaseObserver } from './BoundInstrument';
|
|
19
5
|
import { CorrelationContext } from '../correlation_context/CorrelationContext';
|
|
20
6
|
import { SpanContext } from '../trace/span_context';
|
|
21
7
|
import { ObserverResult } from './ObserverResult';
|
|
@@ -26,11 +12,11 @@ import { ObserverResult } from './ObserverResult';
|
|
|
26
12
|
export declare class NoopMeter implements Meter {
|
|
27
13
|
constructor();
|
|
28
14
|
/**
|
|
29
|
-
* Returns constant noop
|
|
15
|
+
* Returns constant noop value recorder.
|
|
30
16
|
* @param name the name of the metric.
|
|
31
17
|
* @param [options] the metric options.
|
|
32
18
|
*/
|
|
33
|
-
|
|
19
|
+
createValueRecorder(name: string, options?: MetricOptions): ValueRecorder;
|
|
34
20
|
/**
|
|
35
21
|
* Returns a constant noop counter.
|
|
36
22
|
* @param name the name of the metric.
|
|
@@ -38,11 +24,24 @@ export declare class NoopMeter implements Meter {
|
|
|
38
24
|
*/
|
|
39
25
|
createCounter(name: string, options?: MetricOptions): Counter;
|
|
40
26
|
/**
|
|
41
|
-
* Returns constant noop
|
|
27
|
+
* Returns a constant noop UpDownCounter.
|
|
28
|
+
* @param name the name of the metric.
|
|
29
|
+
* @param [options] the metric options.
|
|
30
|
+
*/
|
|
31
|
+
createUpDownCounter(name: string, options?: MetricOptions): UpDownCounter;
|
|
32
|
+
/**
|
|
33
|
+
* Returns constant noop value observer.
|
|
42
34
|
* @param name the name of the metric.
|
|
43
35
|
* @param [options] the metric options.
|
|
36
|
+
* @param [callback] the value observer callback
|
|
44
37
|
*/
|
|
45
|
-
|
|
38
|
+
createValueObserver(name: string, options?: MetricOptions, callback?: (observerResult: ObserverResult) => void): ValueObserver;
|
|
39
|
+
/**
|
|
40
|
+
* Returns constant noop batch observer.
|
|
41
|
+
* @param name the name of the metric.
|
|
42
|
+
* @param callback the batch observer callback
|
|
43
|
+
*/
|
|
44
|
+
createBatchObserver(name: string, callback: (batchObserverResult: BatchObserverResult) => void): BatchObserver;
|
|
46
45
|
}
|
|
47
46
|
export declare class NoopMetric<T> implements UnboundMetric<T> {
|
|
48
47
|
private readonly _instrument;
|
|
@@ -68,22 +67,34 @@ export declare class NoopMetric<T> implements UnboundMetric<T> {
|
|
|
68
67
|
export declare class NoopCounterMetric extends NoopMetric<BoundCounter> implements Counter {
|
|
69
68
|
add(value: number, labels: Labels): void;
|
|
70
69
|
}
|
|
71
|
-
export declare class
|
|
70
|
+
export declare class NoopValueRecorderMetric extends NoopMetric<BoundValueRecorder> implements ValueRecorder {
|
|
72
71
|
record(value: number, labels: Labels, correlationContext?: CorrelationContext, spanContext?: SpanContext): void;
|
|
73
72
|
}
|
|
74
|
-
export declare class
|
|
75
|
-
|
|
73
|
+
export declare class NoopBaseObserverMetric extends NoopMetric<BoundBaseObserver> implements BaseObserver {
|
|
74
|
+
observation(): {
|
|
75
|
+
observer: BaseObserver;
|
|
76
|
+
value: number;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export declare class NoopBatchObserverMetric extends NoopMetric<void> implements BatchObserver {
|
|
76
80
|
}
|
|
77
81
|
export declare class NoopBoundCounter implements BoundCounter {
|
|
78
82
|
add(value: number): void;
|
|
79
83
|
}
|
|
80
|
-
export declare class
|
|
84
|
+
export declare class NoopBoundValueRecorder implements BoundValueRecorder {
|
|
81
85
|
record(value: number, correlationContext?: CorrelationContext, spanContext?: SpanContext): void;
|
|
82
86
|
}
|
|
87
|
+
export declare class NoopBoundBaseObserver implements BoundBaseObserver {
|
|
88
|
+
update(value: number): void;
|
|
89
|
+
}
|
|
83
90
|
export declare const NOOP_METER: NoopMeter;
|
|
84
91
|
export declare const NOOP_BOUND_COUNTER: NoopBoundCounter;
|
|
85
92
|
export declare const NOOP_COUNTER_METRIC: NoopCounterMetric;
|
|
86
|
-
export declare const
|
|
87
|
-
export declare const
|
|
88
|
-
export declare const
|
|
93
|
+
export declare const NOOP_BOUND_VALUE_RECORDER: NoopBoundValueRecorder;
|
|
94
|
+
export declare const NOOP_VALUE_RECORDER_METRIC: NoopValueRecorderMetric;
|
|
95
|
+
export declare const NOOP_BOUND_BASE_OBSERVER: NoopBoundBaseObserver;
|
|
96
|
+
export declare const NOOP_VALUE_OBSERVER_METRIC: NoopBaseObserverMetric;
|
|
97
|
+
export declare const NOOP_UP_DOWN_SUM_OBSERVER_METRIC: NoopBaseObserverMetric;
|
|
98
|
+
export declare const NOOP_SUM_OBSERVER_METRIC: NoopBaseObserverMetric;
|
|
99
|
+
export declare const NOOP_BATCH_OBSERVER_METRIC: NoopBatchObserverMetric;
|
|
89
100
|
//# sourceMappingURL=NoopMeter.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* Copyright
|
|
2
|
+
/*
|
|
3
|
+
* Copyright The OpenTelemetry Authors
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -14,41 +14,74 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
var __extends = (this && this.__extends) || (function () {
|
|
18
|
+
var extendStatics = function (d, b) {
|
|
19
|
+
extendStatics = Object.setPrototypeOf ||
|
|
20
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
21
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
22
|
+
return extendStatics(d, b);
|
|
23
|
+
};
|
|
24
|
+
return function (d, b) {
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
17
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.NOOP_BATCH_OBSERVER_METRIC = exports.NOOP_SUM_OBSERVER_METRIC = exports.NOOP_UP_DOWN_SUM_OBSERVER_METRIC = exports.NOOP_VALUE_OBSERVER_METRIC = exports.NOOP_BOUND_BASE_OBSERVER = exports.NOOP_VALUE_RECORDER_METRIC = exports.NOOP_BOUND_VALUE_RECORDER = exports.NOOP_COUNTER_METRIC = exports.NOOP_BOUND_COUNTER = exports.NOOP_METER = exports.NoopBoundBaseObserver = exports.NoopBoundValueRecorder = exports.NoopBoundCounter = exports.NoopBatchObserverMetric = exports.NoopBaseObserverMetric = exports.NoopValueRecorderMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = void 0;
|
|
18
32
|
/**
|
|
19
33
|
* NoopMeter is a noop implementation of the {@link Meter} interface. It reuses
|
|
20
34
|
* constant NoopMetrics for all of its methods.
|
|
21
35
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
36
|
+
var NoopMeter = /** @class */ (function () {
|
|
37
|
+
function NoopMeter() {
|
|
38
|
+
}
|
|
24
39
|
/**
|
|
25
|
-
* Returns constant noop
|
|
40
|
+
* Returns constant noop value recorder.
|
|
26
41
|
* @param name the name of the metric.
|
|
27
42
|
* @param [options] the metric options.
|
|
28
43
|
*/
|
|
29
|
-
|
|
30
|
-
return exports.
|
|
31
|
-
}
|
|
44
|
+
NoopMeter.prototype.createValueRecorder = function (name, options) {
|
|
45
|
+
return exports.NOOP_VALUE_RECORDER_METRIC;
|
|
46
|
+
};
|
|
32
47
|
/**
|
|
33
48
|
* Returns a constant noop counter.
|
|
34
49
|
* @param name the name of the metric.
|
|
35
50
|
* @param [options] the metric options.
|
|
36
51
|
*/
|
|
37
|
-
createCounter(name, options) {
|
|
52
|
+
NoopMeter.prototype.createCounter = function (name, options) {
|
|
38
53
|
return exports.NOOP_COUNTER_METRIC;
|
|
39
|
-
}
|
|
54
|
+
};
|
|
40
55
|
/**
|
|
41
|
-
* Returns constant noop
|
|
56
|
+
* Returns a constant noop UpDownCounter.
|
|
42
57
|
* @param name the name of the metric.
|
|
43
58
|
* @param [options] the metric options.
|
|
44
59
|
*/
|
|
45
|
-
|
|
46
|
-
return exports.
|
|
47
|
-
}
|
|
48
|
-
|
|
60
|
+
NoopMeter.prototype.createUpDownCounter = function (name, options) {
|
|
61
|
+
return exports.NOOP_COUNTER_METRIC;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Returns constant noop value observer.
|
|
65
|
+
* @param name the name of the metric.
|
|
66
|
+
* @param [options] the metric options.
|
|
67
|
+
* @param [callback] the value observer callback
|
|
68
|
+
*/
|
|
69
|
+
NoopMeter.prototype.createValueObserver = function (name, options, callback) {
|
|
70
|
+
return exports.NOOP_VALUE_OBSERVER_METRIC;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Returns constant noop batch observer.
|
|
74
|
+
* @param name the name of the metric.
|
|
75
|
+
* @param callback the batch observer callback
|
|
76
|
+
*/
|
|
77
|
+
NoopMeter.prototype.createBatchObserver = function (name, callback) {
|
|
78
|
+
return exports.NOOP_BATCH_OBSERVER_METRIC;
|
|
79
|
+
};
|
|
80
|
+
return NoopMeter;
|
|
81
|
+
}());
|
|
49
82
|
exports.NoopMeter = NoopMeter;
|
|
50
|
-
|
|
51
|
-
|
|
83
|
+
var NoopMetric = /** @class */ (function () {
|
|
84
|
+
function NoopMetric(instrument) {
|
|
52
85
|
this._instrument = instrument;
|
|
53
86
|
}
|
|
54
87
|
/**
|
|
@@ -58,32 +91,42 @@ class NoopMetric {
|
|
|
58
91
|
* @param labels key-values pairs that are associated with a specific metric
|
|
59
92
|
* that you want to record.
|
|
60
93
|
*/
|
|
61
|
-
bind(labels) {
|
|
94
|
+
NoopMetric.prototype.bind = function (labels) {
|
|
62
95
|
return this._instrument;
|
|
63
|
-
}
|
|
96
|
+
};
|
|
64
97
|
/**
|
|
65
98
|
* Removes the Binding from the metric, if it is present.
|
|
66
99
|
* @param labels key-values pairs that are associated with a specific metric.
|
|
67
100
|
*/
|
|
68
|
-
unbind(labels) {
|
|
101
|
+
NoopMetric.prototype.unbind = function (labels) {
|
|
69
102
|
return;
|
|
70
|
-
}
|
|
103
|
+
};
|
|
71
104
|
/**
|
|
72
105
|
* Clears all timeseries from the Metric.
|
|
73
106
|
*/
|
|
74
|
-
clear() {
|
|
107
|
+
NoopMetric.prototype.clear = function () {
|
|
75
108
|
return;
|
|
76
|
-
}
|
|
77
|
-
|
|
109
|
+
};
|
|
110
|
+
return NoopMetric;
|
|
111
|
+
}());
|
|
78
112
|
exports.NoopMetric = NoopMetric;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
113
|
+
var NoopCounterMetric = /** @class */ (function (_super) {
|
|
114
|
+
__extends(NoopCounterMetric, _super);
|
|
115
|
+
function NoopCounterMetric() {
|
|
116
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
82
117
|
}
|
|
83
|
-
|
|
118
|
+
NoopCounterMetric.prototype.add = function (value, labels) {
|
|
119
|
+
this.bind(labels).add(value);
|
|
120
|
+
};
|
|
121
|
+
return NoopCounterMetric;
|
|
122
|
+
}(NoopMetric));
|
|
84
123
|
exports.NoopCounterMetric = NoopCounterMetric;
|
|
85
|
-
class
|
|
86
|
-
|
|
124
|
+
var NoopValueRecorderMetric = /** @class */ (function (_super) {
|
|
125
|
+
__extends(NoopValueRecorderMetric, _super);
|
|
126
|
+
function NoopValueRecorderMetric() {
|
|
127
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
128
|
+
}
|
|
129
|
+
NoopValueRecorderMetric.prototype.record = function (value, labels, correlationContext, spanContext) {
|
|
87
130
|
if (typeof correlationContext === 'undefined') {
|
|
88
131
|
this.bind(labels).record(value);
|
|
89
132
|
}
|
|
@@ -93,29 +136,65 @@ class NoopMeasureMetric extends NoopMetric {
|
|
|
93
136
|
else {
|
|
94
137
|
this.bind(labels).record(value, correlationContext, spanContext);
|
|
95
138
|
}
|
|
139
|
+
};
|
|
140
|
+
return NoopValueRecorderMetric;
|
|
141
|
+
}(NoopMetric));
|
|
142
|
+
exports.NoopValueRecorderMetric = NoopValueRecorderMetric;
|
|
143
|
+
var NoopBaseObserverMetric = /** @class */ (function (_super) {
|
|
144
|
+
__extends(NoopBaseObserverMetric, _super);
|
|
145
|
+
function NoopBaseObserverMetric() {
|
|
146
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
96
147
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
148
|
+
NoopBaseObserverMetric.prototype.observation = function () {
|
|
149
|
+
return {
|
|
150
|
+
observer: this,
|
|
151
|
+
value: 0,
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
return NoopBaseObserverMetric;
|
|
155
|
+
}(NoopMetric));
|
|
156
|
+
exports.NoopBaseObserverMetric = NoopBaseObserverMetric;
|
|
157
|
+
var NoopBatchObserverMetric = /** @class */ (function (_super) {
|
|
158
|
+
__extends(NoopBatchObserverMetric, _super);
|
|
159
|
+
function NoopBatchObserverMetric() {
|
|
160
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
161
|
+
}
|
|
162
|
+
return NoopBatchObserverMetric;
|
|
163
|
+
}(NoopMetric));
|
|
164
|
+
exports.NoopBatchObserverMetric = NoopBatchObserverMetric;
|
|
165
|
+
var NoopBoundCounter = /** @class */ (function () {
|
|
166
|
+
function NoopBoundCounter() {
|
|
106
167
|
}
|
|
107
|
-
|
|
168
|
+
NoopBoundCounter.prototype.add = function (value) {
|
|
169
|
+
return;
|
|
170
|
+
};
|
|
171
|
+
return NoopBoundCounter;
|
|
172
|
+
}());
|
|
108
173
|
exports.NoopBoundCounter = NoopBoundCounter;
|
|
109
|
-
class
|
|
110
|
-
|
|
174
|
+
var NoopBoundValueRecorder = /** @class */ (function () {
|
|
175
|
+
function NoopBoundValueRecorder() {
|
|
176
|
+
}
|
|
177
|
+
NoopBoundValueRecorder.prototype.record = function (value, correlationContext, spanContext) {
|
|
111
178
|
return;
|
|
179
|
+
};
|
|
180
|
+
return NoopBoundValueRecorder;
|
|
181
|
+
}());
|
|
182
|
+
exports.NoopBoundValueRecorder = NoopBoundValueRecorder;
|
|
183
|
+
var NoopBoundBaseObserver = /** @class */ (function () {
|
|
184
|
+
function NoopBoundBaseObserver() {
|
|
112
185
|
}
|
|
113
|
-
}
|
|
114
|
-
|
|
186
|
+
NoopBoundBaseObserver.prototype.update = function (value) { };
|
|
187
|
+
return NoopBoundBaseObserver;
|
|
188
|
+
}());
|
|
189
|
+
exports.NoopBoundBaseObserver = NoopBoundBaseObserver;
|
|
115
190
|
exports.NOOP_METER = new NoopMeter();
|
|
116
191
|
exports.NOOP_BOUND_COUNTER = new NoopBoundCounter();
|
|
117
192
|
exports.NOOP_COUNTER_METRIC = new NoopCounterMetric(exports.NOOP_BOUND_COUNTER);
|
|
118
|
-
exports.
|
|
119
|
-
exports.
|
|
120
|
-
exports.
|
|
193
|
+
exports.NOOP_BOUND_VALUE_RECORDER = new NoopBoundValueRecorder();
|
|
194
|
+
exports.NOOP_VALUE_RECORDER_METRIC = new NoopValueRecorderMetric(exports.NOOP_BOUND_VALUE_RECORDER);
|
|
195
|
+
exports.NOOP_BOUND_BASE_OBSERVER = new NoopBoundBaseObserver();
|
|
196
|
+
exports.NOOP_VALUE_OBSERVER_METRIC = new NoopBaseObserverMetric(exports.NOOP_BOUND_BASE_OBSERVER);
|
|
197
|
+
exports.NOOP_UP_DOWN_SUM_OBSERVER_METRIC = new NoopBaseObserverMetric(exports.NOOP_BOUND_BASE_OBSERVER);
|
|
198
|
+
exports.NOOP_SUM_OBSERVER_METRIC = new NoopBaseObserverMetric(exports.NOOP_BOUND_BASE_OBSERVER);
|
|
199
|
+
exports.NOOP_BATCH_OBSERVER_METRIC = new NoopBatchObserverMetric();
|
|
121
200
|
//# sourceMappingURL=NoopMeter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NoopMeter.js","sourceRoot":"","sources":["../../../src/metrics/NoopMeter.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2019, 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
1
|
import { Meter } from './Meter';
|
|
17
2
|
import { MeterProvider } from './MeterProvider';
|
|
18
3
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* Copyright
|
|
2
|
+
/*
|
|
3
|
+
* Copyright The OpenTelemetry Authors
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -15,16 +15,20 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
18
|
+
exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = void 0;
|
|
19
|
+
var NoopMeter_1 = require("./NoopMeter");
|
|
19
20
|
/**
|
|
20
21
|
* An implementation of the {@link MeterProvider} which returns an impotent Meter
|
|
21
22
|
* for all calls to `getMeter`
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return NoopMeter_1.NOOP_METER;
|
|
24
|
+
var NoopMeterProvider = /** @class */ (function () {
|
|
25
|
+
function NoopMeterProvider() {
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
NoopMeterProvider.prototype.getMeter = function (_name, _version) {
|
|
28
|
+
return NoopMeter_1.NOOP_METER;
|
|
29
|
+
};
|
|
30
|
+
return NoopMeterProvider;
|
|
31
|
+
}());
|
|
28
32
|
exports.NoopMeterProvider = NoopMeterProvider;
|
|
29
33
|
exports.NOOP_METER_PROVIDER = new NoopMeterProvider();
|
|
30
34
|
//# sourceMappingURL=NoopMeterProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NoopMeterProvider.js","sourceRoot":"","sources":["../../../src/metrics/NoopMeterProvider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,yCAAyC;AAEzC;;;GAGG;AACH;IAAA;IAIA,CAAC;IAHC,oCAAQ,GAAR,UAAS,KAAc,EAAE,QAAiB;QACxC,OAAO,sBAAU,CAAC;IACpB,CAAC;IACH,wBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,8CAAiB;AAMjB,QAAA,mBAAmB,GAAG,IAAI,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright The OpenTelemetry Authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
//# sourceMappingURL=Observation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Observation.js","sourceRoot":"","sources":["../../../src/metrics/Observation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -1,24 +1,8 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2020, 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
1
|
import { Labels } from './Metric';
|
|
17
|
-
import { MetricObservable } from './MetricObservable';
|
|
18
2
|
/**
|
|
19
|
-
* Interface that is being used in function
|
|
3
|
+
* Interface that is being used in callback function for Observer Metric
|
|
20
4
|
*/
|
|
21
5
|
export interface ObserverResult {
|
|
22
|
-
observe(
|
|
6
|
+
observe(value: number, labels: Labels): void;
|
|
23
7
|
}
|
|
24
8
|
//# sourceMappingURL=ObserverResult.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObserverResult.js","sourceRoot":"","sources":["../../../src/metrics/ObserverResult.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2020, 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
1
|
/** only globals that common to node and browsers are allowed */
|
|
17
2
|
export declare const _globalThis: typeof globalThis;
|
|
18
3
|
//# sourceMappingURL=globalThis.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* Copyright
|
|
2
|
+
/*
|
|
3
|
+
* Copyright The OpenTelemetry Authors
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports._globalThis = void 0;
|
|
18
19
|
/** only globals that common to node and browsers are allowed */
|
|
19
20
|
// eslint-disable-next-line node/no-unsupported-features/es-builtins, no-undef
|
|
20
21
|
exports._globalThis = typeof globalThis === 'object' ? globalThis : window;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalThis.js","sourceRoot":"","sources":["../../../../src/platform/browser/globalThis.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,gEAAgE;AAChE,8EAA8E;AACjE,QAAA,WAAW,GAAG,OAAO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC"}
|