@opentelemetry/exporter-metrics-otlp-http 0.40.0 → 0.41.1
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 +2 -3
- package/build/esm/OTLPMetricExporterBase.d.ts +2 -1
- package/build/esm/OTLPMetricExporterBase.js +20 -1
- package/build/esm/OTLPMetricExporterBase.js.map +1 -1
- package/build/esm/OTLPMetricExporterOptions.d.ts +7 -2
- package/build/esm/OTLPMetricExporterOptions.js +6 -1
- package/build/esm/OTLPMetricExporterOptions.js.map +1 -1
- package/build/esm/version.d.ts +1 -1
- package/build/esm/version.js +1 -1
- package/build/esm/version.js.map +1 -1
- package/build/esnext/OTLPMetricExporterBase.d.ts +2 -1
- package/build/esnext/OTLPMetricExporterBase.js +20 -1
- package/build/esnext/OTLPMetricExporterBase.js.map +1 -1
- package/build/esnext/OTLPMetricExporterOptions.d.ts +7 -2
- package/build/esnext/OTLPMetricExporterOptions.js +6 -1
- package/build/esnext/OTLPMetricExporterOptions.js.map +1 -1
- package/build/esnext/version.d.ts +1 -1
- package/build/esnext/version.js +1 -1
- package/build/esnext/version.js.map +1 -1
- package/build/src/OTLPMetricExporterBase.d.ts +2 -1
- package/build/src/OTLPMetricExporterBase.js +22 -2
- package/build/src/OTLPMetricExporterBase.js.map +1 -1
- package/build/src/OTLPMetricExporterOptions.d.ts +7 -2
- package/build/src/OTLPMetricExporterOptions.js +7 -0
- package/build/src/OTLPMetricExporterOptions.js.map +1 -1
- 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 +23 -21
package/README.md
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
**Note: This is an experimental package under active development. New releases may include breaking changes.**
|
|
7
7
|
|
|
8
|
-
This module provides exporter for
|
|
9
|
-
Compatible with [opentelemetry-collector][opentelemetry-collector-url] versions `>=0.52 <=0.53`.
|
|
8
|
+
This module provides a metrics-exporter for OTLP (http/json) using protocol version `v0.20.0`.
|
|
10
9
|
|
|
11
10
|
## Installation
|
|
12
11
|
|
|
@@ -81,7 +80,7 @@ In addition to settings passed to the constructor, the exporter also supports co
|
|
|
81
80
|
|---------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
82
81
|
| OTEL_EXPORTER_OTLP_ENDPOINT | The endpoint to send metrics to. This will also be used for the traces exporter if `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` is not configured. By default `http://localhost:4318` will be used. `/v1/metrics` will be automatically appended to configured values. |
|
|
83
82
|
| OTEL_EXPORTER_OTLP_METRICS_ENDPOINT | The endpoint to send metrics to. By default `https://localhost:4318/v1/metrics` will be used. `v1/metrics` will not be appended automatically and has to be added explicitly. |
|
|
84
|
-
| OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE | The exporters aggregation temporality preference. Valid values are `cumulative`, and `
|
|
83
|
+
| OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE | The exporters aggregation temporality preference. Valid values are `cumulative`, `delta`, and `lowmemory`. `cumulative` selects cumulative temporality for all instrument kinds. `delta` selects delta aggregation temporality for Counter, Asynchronous Counter and Histogram instrument kinds, and selects cumulative aggregation for UpDownCounter and Asynchronous UpDownCounter instrument kinds. `lowmemory` selects delta aggregation temporality for Counter and Histogram instrument kinds, and selects cumulative aggregation for UpDownCounter, Asynchronous Counter and Asynchronous UpDownCounter instrument kinds. By default `cumulative` is used. |
|
|
85
84
|
|
|
86
85
|
> Settings configured programmatically take precedence over environment variables. Per-signal environment variables take
|
|
87
86
|
> precedence over non-per-signal environment variables.
|
|
@@ -5,9 +5,10 @@ import { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
|
|
|
5
5
|
import { IExportMetricsServiceRequest } from '@opentelemetry/otlp-transformer';
|
|
6
6
|
export declare const CumulativeTemporalitySelector: AggregationTemporalitySelector;
|
|
7
7
|
export declare const DeltaTemporalitySelector: AggregationTemporalitySelector;
|
|
8
|
+
export declare const LowMemoryTemporalitySelector: AggregationTemporalitySelector;
|
|
8
9
|
export declare class OTLPMetricExporterBase<T extends OTLPExporterBase<OTLPMetricExporterOptions, ResourceMetrics, IExportMetricsServiceRequest>> implements PushMetricExporter {
|
|
9
10
|
_otlpExporter: T;
|
|
10
|
-
|
|
11
|
+
private _aggregationTemporalitySelector;
|
|
11
12
|
constructor(exporter: T, config?: OTLPMetricExporterOptions);
|
|
12
13
|
export(metrics: ResourceMetrics, resultCallback: (result: ExportResult) => void): void;
|
|
13
14
|
shutdown(): Promise<void>;
|
|
@@ -51,6 +51,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51
51
|
};
|
|
52
52
|
import { getEnv } from '@opentelemetry/core';
|
|
53
53
|
import { AggregationTemporality, InstrumentType, } from '@opentelemetry/sdk-metrics';
|
|
54
|
+
import { AggregationTemporalityPreference, } from './OTLPMetricExporterOptions';
|
|
54
55
|
import { diag } from '@opentelemetry/api';
|
|
55
56
|
export var CumulativeTemporalitySelector = function () { return AggregationTemporality.CUMULATIVE; };
|
|
56
57
|
export var DeltaTemporalitySelector = function (instrumentType) {
|
|
@@ -65,6 +66,18 @@ export var DeltaTemporalitySelector = function (instrumentType) {
|
|
|
65
66
|
return AggregationTemporality.CUMULATIVE;
|
|
66
67
|
}
|
|
67
68
|
};
|
|
69
|
+
export var LowMemoryTemporalitySelector = function (instrumentType) {
|
|
70
|
+
switch (instrumentType) {
|
|
71
|
+
case InstrumentType.COUNTER:
|
|
72
|
+
case InstrumentType.HISTOGRAM:
|
|
73
|
+
return AggregationTemporality.DELTA;
|
|
74
|
+
case InstrumentType.UP_DOWN_COUNTER:
|
|
75
|
+
case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:
|
|
76
|
+
case InstrumentType.OBSERVABLE_COUNTER:
|
|
77
|
+
case InstrumentType.OBSERVABLE_GAUGE:
|
|
78
|
+
return AggregationTemporality.CUMULATIVE;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
68
81
|
function chooseTemporalitySelectorFromEnvironment() {
|
|
69
82
|
var env = getEnv();
|
|
70
83
|
var configuredTemporality = env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();
|
|
@@ -74,15 +87,21 @@ function chooseTemporalitySelectorFromEnvironment() {
|
|
|
74
87
|
if (configuredTemporality === 'delta') {
|
|
75
88
|
return DeltaTemporalitySelector;
|
|
76
89
|
}
|
|
90
|
+
if (configuredTemporality === 'lowmemory') {
|
|
91
|
+
return LowMemoryTemporalitySelector;
|
|
92
|
+
}
|
|
77
93
|
diag.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '" + env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + "', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.");
|
|
78
94
|
return CumulativeTemporalitySelector;
|
|
79
95
|
}
|
|
80
96
|
function chooseTemporalitySelector(temporalityPreference) {
|
|
81
97
|
// Directly passed preference has priority.
|
|
82
98
|
if (temporalityPreference != null) {
|
|
83
|
-
if (temporalityPreference ===
|
|
99
|
+
if (temporalityPreference === AggregationTemporalityPreference.DELTA) {
|
|
84
100
|
return DeltaTemporalitySelector;
|
|
85
101
|
}
|
|
102
|
+
else if (temporalityPreference === AggregationTemporalityPreference.LOWMEMORY) {
|
|
103
|
+
return LowMemoryTemporalitySelector;
|
|
104
|
+
}
|
|
86
105
|
return CumulativeTemporalitySelector;
|
|
87
106
|
}
|
|
88
107
|
return chooseTemporalitySelectorFromEnvironment();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPMetricExporterBase.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterBase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OA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aAAa,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,CAAC;IACvD,CAAC;IAEK,yCAAQ,GAAd;;;;4BACE,qBAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,EAAA;;wBAAnC,SAAmC,CAAC;;;;;KACrC;IAED,2CAAU,GAAV;QACE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,6DAA4B,GAA5B,UACE,cAA8B;QAE9B,OAAO,IAAI,CAAC,+BAA+B,CAAC,cAAc,CAAC,CAAC;IAC9D,CAAC;IACH,6BAAC;AAAD,CAAC,AAtCD,IAsCC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExportResult, getEnv } from '@opentelemetry/core';\nimport {\n AggregationTemporality,\n AggregationTemporalitySelector,\n InstrumentType,\n PushMetricExporter,\n ResourceMetrics,\n} from '@opentelemetry/sdk-metrics';\nimport {\n AggregationTemporalityPreference,\n OTLPMetricExporterOptions,\n} from './OTLPMetricExporterOptions';\nimport { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';\nimport { IExportMetricsServiceRequest } from '@opentelemetry/otlp-transformer';\nimport { diag } from '@opentelemetry/api';\n\nexport const CumulativeTemporalitySelector: AggregationTemporalitySelector =\n () => AggregationTemporality.CUMULATIVE;\n\nexport const DeltaTemporalitySelector: AggregationTemporalitySelector = (\n instrumentType: InstrumentType\n) => {\n switch (instrumentType) {\n case InstrumentType.COUNTER:\n case InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentType.HISTOGRAM:\n case InstrumentType.OBSERVABLE_GAUGE:\n return AggregationTemporality.DELTA;\n case InstrumentType.UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:\n return AggregationTemporality.CUMULATIVE;\n }\n};\n\nexport const LowMemoryTemporalitySelector: AggregationTemporalitySelector = (\n instrumentType: InstrumentType\n) => {\n switch (instrumentType) {\n case InstrumentType.COUNTER:\n case InstrumentType.HISTOGRAM:\n return AggregationTemporality.DELTA;\n case InstrumentType.UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentType.OBSERVABLE_GAUGE:\n return AggregationTemporality.CUMULATIVE;\n }\n};\n\nfunction chooseTemporalitySelectorFromEnvironment() {\n const env = getEnv();\n const configuredTemporality =\n env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();\n\n if (configuredTemporality === 'cumulative') {\n return CumulativeTemporalitySelector;\n }\n if (configuredTemporality === 'delta') {\n return DeltaTemporalitySelector;\n }\n if (configuredTemporality === 'lowmemory') {\n return LowMemoryTemporalitySelector;\n }\n\n diag.warn(\n `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`\n );\n return CumulativeTemporalitySelector;\n}\n\nfunction chooseTemporalitySelector(\n temporalityPreference?:\n | AggregationTemporalityPreference\n | AggregationTemporality\n): AggregationTemporalitySelector {\n // Directly passed preference has priority.\n if (temporalityPreference != null) {\n if (temporalityPreference === AggregationTemporalityPreference.DELTA) {\n return DeltaTemporalitySelector;\n } else if (\n temporalityPreference === AggregationTemporalityPreference.LOWMEMORY\n ) {\n return LowMemoryTemporalitySelector;\n }\n return CumulativeTemporalitySelector;\n }\n\n return chooseTemporalitySelectorFromEnvironment();\n}\n\nexport class OTLPMetricExporterBase<\n T extends OTLPExporterBase<\n OTLPMetricExporterOptions,\n ResourceMetrics,\n IExportMetricsServiceRequest\n >\n> implements PushMetricExporter\n{\n public _otlpExporter: T;\n private _aggregationTemporalitySelector: AggregationTemporalitySelector;\n\n constructor(exporter: T, config?: OTLPMetricExporterOptions) {\n this._otlpExporter = exporter;\n this._aggregationTemporalitySelector = chooseTemporalitySelector(\n config?.temporalityPreference\n );\n }\n\n export(\n metrics: ResourceMetrics,\n resultCallback: (result: ExportResult) => void\n ): void {\n this._otlpExporter.export([metrics], resultCallback);\n }\n\n async shutdown(): Promise<void> {\n await this._otlpExporter.shutdown();\n }\n\n forceFlush(): Promise<void> {\n return Promise.resolve();\n }\n\n selectAggregationTemporality(\n instrumentType: InstrumentType\n ): AggregationTemporality {\n return this._aggregationTemporalitySelector(instrumentType);\n }\n}\n"]}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { AggregationTemporality } from '@opentelemetry/sdk-metrics';
|
|
2
1
|
import { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
2
|
+
import { AggregationTemporality } from '@opentelemetry/sdk-metrics';
|
|
3
3
|
export interface OTLPMetricExporterOptions extends OTLPExporterConfigBase {
|
|
4
|
-
temporalityPreference?: AggregationTemporality;
|
|
4
|
+
temporalityPreference?: AggregationTemporalityPreference | AggregationTemporality;
|
|
5
|
+
}
|
|
6
|
+
export declare enum AggregationTemporalityPreference {
|
|
7
|
+
DELTA = 0,
|
|
8
|
+
CUMULATIVE = 1,
|
|
9
|
+
LOWMEMORY = 2
|
|
5
10
|
}
|
|
6
11
|
//# sourceMappingURL=OTLPMetricExporterOptions.d.ts.map
|
|
@@ -13,5 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export var AggregationTemporalityPreference;
|
|
17
|
+
(function (AggregationTemporalityPreference) {
|
|
18
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["DELTA"] = 0] = "DELTA";
|
|
19
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["CUMULATIVE"] = 1] = "CUMULATIVE";
|
|
20
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["LOWMEMORY"] = 2] = "LOWMEMORY";
|
|
21
|
+
})(AggregationTemporalityPreference || (AggregationTemporalityPreference = {}));
|
|
17
22
|
//# sourceMappingURL=OTLPMetricExporterOptions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPMetricExporterOptions.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"OTLPMetricExporterOptions.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,MAAM,CAAN,IAAY,gCAIX;AAJD,WAAY,gCAAgC;IAC1C,yFAAK,CAAA;IACL,mGAAU,CAAA;IACV,iGAAS,CAAA;AACX,CAAC,EAJW,gCAAgC,KAAhC,gCAAgC,QAI3C","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport { AggregationTemporality } from '@opentelemetry/sdk-metrics';\n\nexport interface OTLPMetricExporterOptions extends OTLPExporterConfigBase {\n temporalityPreference?:\n | AggregationTemporalityPreference\n | AggregationTemporality;\n}\n\nexport enum AggregationTemporalityPreference {\n DELTA,\n CUMULATIVE,\n LOWMEMORY,\n}\n"]}
|
package/build/esm/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.41.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/esm/version.js
CHANGED
package/build/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.41.1';\n"]}
|
|
@@ -5,9 +5,10 @@ import { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
|
|
|
5
5
|
import { IExportMetricsServiceRequest } from '@opentelemetry/otlp-transformer';
|
|
6
6
|
export declare const CumulativeTemporalitySelector: AggregationTemporalitySelector;
|
|
7
7
|
export declare const DeltaTemporalitySelector: AggregationTemporalitySelector;
|
|
8
|
+
export declare const LowMemoryTemporalitySelector: AggregationTemporalitySelector;
|
|
8
9
|
export declare class OTLPMetricExporterBase<T extends OTLPExporterBase<OTLPMetricExporterOptions, ResourceMetrics, IExportMetricsServiceRequest>> implements PushMetricExporter {
|
|
9
10
|
_otlpExporter: T;
|
|
10
|
-
|
|
11
|
+
private _aggregationTemporalitySelector;
|
|
11
12
|
constructor(exporter: T, config?: OTLPMetricExporterOptions);
|
|
12
13
|
export(metrics: ResourceMetrics, resultCallback: (result: ExportResult) => void): void;
|
|
13
14
|
shutdown(): Promise<void>;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { getEnv } from '@opentelemetry/core';
|
|
17
17
|
import { AggregationTemporality, InstrumentType, } from '@opentelemetry/sdk-metrics';
|
|
18
|
+
import { AggregationTemporalityPreference, } from './OTLPMetricExporterOptions';
|
|
18
19
|
import { diag } from '@opentelemetry/api';
|
|
19
20
|
export const CumulativeTemporalitySelector = () => AggregationTemporality.CUMULATIVE;
|
|
20
21
|
export const DeltaTemporalitySelector = (instrumentType) => {
|
|
@@ -29,6 +30,18 @@ export const DeltaTemporalitySelector = (instrumentType) => {
|
|
|
29
30
|
return AggregationTemporality.CUMULATIVE;
|
|
30
31
|
}
|
|
31
32
|
};
|
|
33
|
+
export const LowMemoryTemporalitySelector = (instrumentType) => {
|
|
34
|
+
switch (instrumentType) {
|
|
35
|
+
case InstrumentType.COUNTER:
|
|
36
|
+
case InstrumentType.HISTOGRAM:
|
|
37
|
+
return AggregationTemporality.DELTA;
|
|
38
|
+
case InstrumentType.UP_DOWN_COUNTER:
|
|
39
|
+
case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:
|
|
40
|
+
case InstrumentType.OBSERVABLE_COUNTER:
|
|
41
|
+
case InstrumentType.OBSERVABLE_GAUGE:
|
|
42
|
+
return AggregationTemporality.CUMULATIVE;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
32
45
|
function chooseTemporalitySelectorFromEnvironment() {
|
|
33
46
|
const env = getEnv();
|
|
34
47
|
const configuredTemporality = env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();
|
|
@@ -38,15 +51,21 @@ function chooseTemporalitySelectorFromEnvironment() {
|
|
|
38
51
|
if (configuredTemporality === 'delta') {
|
|
39
52
|
return DeltaTemporalitySelector;
|
|
40
53
|
}
|
|
54
|
+
if (configuredTemporality === 'lowmemory') {
|
|
55
|
+
return LowMemoryTemporalitySelector;
|
|
56
|
+
}
|
|
41
57
|
diag.warn(`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`);
|
|
42
58
|
return CumulativeTemporalitySelector;
|
|
43
59
|
}
|
|
44
60
|
function chooseTemporalitySelector(temporalityPreference) {
|
|
45
61
|
// Directly passed preference has priority.
|
|
46
62
|
if (temporalityPreference != null) {
|
|
47
|
-
if (temporalityPreference ===
|
|
63
|
+
if (temporalityPreference === AggregationTemporalityPreference.DELTA) {
|
|
48
64
|
return DeltaTemporalitySelector;
|
|
49
65
|
}
|
|
66
|
+
else if (temporalityPreference === AggregationTemporalityPreference.LOWMEMORY) {
|
|
67
|
+
return LowMemoryTemporalitySelector;
|
|
68
|
+
}
|
|
50
69
|
return CumulativeTemporalitySelector;
|
|
51
70
|
}
|
|
52
71
|
return chooseTemporalitySelectorFromEnvironment();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPMetricExporterBase.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterBase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAgB,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EACL,sBAAsB,EAEtB,cAAc,GAGf,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"OTLPMetricExporterBase.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterBase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAgB,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EACL,sBAAsB,EAEtB,cAAc,GAGf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,gCAAgC,GAEjC,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,CAAC,MAAM,6BAA6B,GACxC,GAAG,EAAE,CAAC,sBAAsB,CAAC,UAAU,CAAC;AAE1C,MAAM,CAAC,MAAM,wBAAwB,GAAmC,CACtE,cAA8B,EAC9B,EAAE;IACF,QAAQ,cAAc,EAAE;QACtB,KAAK,cAAc,CAAC,OAAO,CAAC;QAC5B,KAAK,cAAc,CAAC,kBAAkB,CAAC;QACvC,KAAK,cAAc,CAAC,SAAS,CAAC;QAC9B,KAAK,cAAc,CAAC,gBAAgB;YAClC,OAAO,sBAAsB,CAAC,KAAK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AgC,CAAC,SAAS,EACpE;YACA,OAAO,4BAA4B,CAAC;SACrC;QACD,OAAO,6BAA6B,CAAC;KACtC;IAED,OAAO,wCAAwC,EAAE,CAAC;AACpD,CAAC;AAED,MAAM,OAAO,sBAAsB;IAWjC,YAAY,QAAW,EAAE,MAAkC;QACzD,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC;QAC9B,IAAI,CAAC,+BAA+B,GAAG,yBAAyB,CAC9D,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,qBAAqB,CAC9B,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,OAAwB,EACxB,cAA8C;QAE9C,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,CAAC;IACvD,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;IAED,UAAU;QACR,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,4BAA4B,CAC1B,cAA8B;QAE9B,OAAO,IAAI,CAAC,+BAA+B,CAAC,cAAc,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExportResult, getEnv } from '@opentelemetry/core';\nimport {\n AggregationTemporality,\n AggregationTemporalitySelector,\n InstrumentType,\n PushMetricExporter,\n ResourceMetrics,\n} from '@opentelemetry/sdk-metrics';\nimport {\n AggregationTemporalityPreference,\n OTLPMetricExporterOptions,\n} from './OTLPMetricExporterOptions';\nimport { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';\nimport { IExportMetricsServiceRequest } from '@opentelemetry/otlp-transformer';\nimport { diag } from '@opentelemetry/api';\n\nexport const CumulativeTemporalitySelector: AggregationTemporalitySelector =\n () => AggregationTemporality.CUMULATIVE;\n\nexport const DeltaTemporalitySelector: AggregationTemporalitySelector = (\n instrumentType: InstrumentType\n) => {\n switch (instrumentType) {\n case InstrumentType.COUNTER:\n case InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentType.HISTOGRAM:\n case InstrumentType.OBSERVABLE_GAUGE:\n return AggregationTemporality.DELTA;\n case InstrumentType.UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:\n return AggregationTemporality.CUMULATIVE;\n }\n};\n\nexport const LowMemoryTemporalitySelector: AggregationTemporalitySelector = (\n instrumentType: InstrumentType\n) => {\n switch (instrumentType) {\n case InstrumentType.COUNTER:\n case InstrumentType.HISTOGRAM:\n return AggregationTemporality.DELTA;\n case InstrumentType.UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentType.OBSERVABLE_GAUGE:\n return AggregationTemporality.CUMULATIVE;\n }\n};\n\nfunction chooseTemporalitySelectorFromEnvironment() {\n const env = getEnv();\n const configuredTemporality =\n env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();\n\n if (configuredTemporality === 'cumulative') {\n return CumulativeTemporalitySelector;\n }\n if (configuredTemporality === 'delta') {\n return DeltaTemporalitySelector;\n }\n if (configuredTemporality === 'lowmemory') {\n return LowMemoryTemporalitySelector;\n }\n\n diag.warn(\n `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`\n );\n return CumulativeTemporalitySelector;\n}\n\nfunction chooseTemporalitySelector(\n temporalityPreference?:\n | AggregationTemporalityPreference\n | AggregationTemporality\n): AggregationTemporalitySelector {\n // Directly passed preference has priority.\n if (temporalityPreference != null) {\n if (temporalityPreference === AggregationTemporalityPreference.DELTA) {\n return DeltaTemporalitySelector;\n } else if (\n temporalityPreference === AggregationTemporalityPreference.LOWMEMORY\n ) {\n return LowMemoryTemporalitySelector;\n }\n return CumulativeTemporalitySelector;\n }\n\n return chooseTemporalitySelectorFromEnvironment();\n}\n\nexport class OTLPMetricExporterBase<\n T extends OTLPExporterBase<\n OTLPMetricExporterOptions,\n ResourceMetrics,\n IExportMetricsServiceRequest\n >\n> implements PushMetricExporter\n{\n public _otlpExporter: T;\n private _aggregationTemporalitySelector: AggregationTemporalitySelector;\n\n constructor(exporter: T, config?: OTLPMetricExporterOptions) {\n this._otlpExporter = exporter;\n this._aggregationTemporalitySelector = chooseTemporalitySelector(\n config?.temporalityPreference\n );\n }\n\n export(\n metrics: ResourceMetrics,\n resultCallback: (result: ExportResult) => void\n ): void {\n this._otlpExporter.export([metrics], resultCallback);\n }\n\n async shutdown(): Promise<void> {\n await this._otlpExporter.shutdown();\n }\n\n forceFlush(): Promise<void> {\n return Promise.resolve();\n }\n\n selectAggregationTemporality(\n instrumentType: InstrumentType\n ): AggregationTemporality {\n return this._aggregationTemporalitySelector(instrumentType);\n }\n}\n"]}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { AggregationTemporality } from '@opentelemetry/sdk-metrics';
|
|
2
1
|
import { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
2
|
+
import { AggregationTemporality } from '@opentelemetry/sdk-metrics';
|
|
3
3
|
export interface OTLPMetricExporterOptions extends OTLPExporterConfigBase {
|
|
4
|
-
temporalityPreference?: AggregationTemporality;
|
|
4
|
+
temporalityPreference?: AggregationTemporalityPreference | AggregationTemporality;
|
|
5
|
+
}
|
|
6
|
+
export declare enum AggregationTemporalityPreference {
|
|
7
|
+
DELTA = 0,
|
|
8
|
+
CUMULATIVE = 1,
|
|
9
|
+
LOWMEMORY = 2
|
|
5
10
|
}
|
|
6
11
|
//# sourceMappingURL=OTLPMetricExporterOptions.d.ts.map
|
|
@@ -13,5 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export var AggregationTemporalityPreference;
|
|
17
|
+
(function (AggregationTemporalityPreference) {
|
|
18
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["DELTA"] = 0] = "DELTA";
|
|
19
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["CUMULATIVE"] = 1] = "CUMULATIVE";
|
|
20
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["LOWMEMORY"] = 2] = "LOWMEMORY";
|
|
21
|
+
})(AggregationTemporalityPreference || (AggregationTemporalityPreference = {}));
|
|
17
22
|
//# sourceMappingURL=OTLPMetricExporterOptions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPMetricExporterOptions.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"OTLPMetricExporterOptions.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,MAAM,CAAN,IAAY,gCAIX;AAJD,WAAY,gCAAgC;IAC1C,yFAAK,CAAA;IACL,mGAAU,CAAA;IACV,iGAAS,CAAA;AACX,CAAC,EAJW,gCAAgC,KAAhC,gCAAgC,QAI3C","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport { AggregationTemporality } from '@opentelemetry/sdk-metrics';\n\nexport interface OTLPMetricExporterOptions extends OTLPExporterConfigBase {\n temporalityPreference?:\n | AggregationTemporalityPreference\n | AggregationTemporality;\n}\n\nexport enum AggregationTemporalityPreference {\n DELTA,\n CUMULATIVE,\n LOWMEMORY,\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.41.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/esnext/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.41.1';\n"]}
|
|
@@ -5,9 +5,10 @@ import { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
|
|
|
5
5
|
import { IExportMetricsServiceRequest } from '@opentelemetry/otlp-transformer';
|
|
6
6
|
export declare const CumulativeTemporalitySelector: AggregationTemporalitySelector;
|
|
7
7
|
export declare const DeltaTemporalitySelector: AggregationTemporalitySelector;
|
|
8
|
+
export declare const LowMemoryTemporalitySelector: AggregationTemporalitySelector;
|
|
8
9
|
export declare class OTLPMetricExporterBase<T extends OTLPExporterBase<OTLPMetricExporterOptions, ResourceMetrics, IExportMetricsServiceRequest>> implements PushMetricExporter {
|
|
9
10
|
_otlpExporter: T;
|
|
10
|
-
|
|
11
|
+
private _aggregationTemporalitySelector;
|
|
11
12
|
constructor(exporter: T, config?: OTLPMetricExporterOptions);
|
|
12
13
|
export(metrics: ResourceMetrics, resultCallback: (result: ExportResult) => void): void;
|
|
13
14
|
shutdown(): Promise<void>;
|
|
@@ -15,9 +15,10 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.OTLPMetricExporterBase = exports.DeltaTemporalitySelector = exports.CumulativeTemporalitySelector = void 0;
|
|
18
|
+
exports.OTLPMetricExporterBase = exports.LowMemoryTemporalitySelector = exports.DeltaTemporalitySelector = exports.CumulativeTemporalitySelector = void 0;
|
|
19
19
|
const core_1 = require("@opentelemetry/core");
|
|
20
20
|
const sdk_metrics_1 = require("@opentelemetry/sdk-metrics");
|
|
21
|
+
const OTLPMetricExporterOptions_1 = require("./OTLPMetricExporterOptions");
|
|
21
22
|
const api_1 = require("@opentelemetry/api");
|
|
22
23
|
const CumulativeTemporalitySelector = () => sdk_metrics_1.AggregationTemporality.CUMULATIVE;
|
|
23
24
|
exports.CumulativeTemporalitySelector = CumulativeTemporalitySelector;
|
|
@@ -34,6 +35,19 @@ const DeltaTemporalitySelector = (instrumentType) => {
|
|
|
34
35
|
}
|
|
35
36
|
};
|
|
36
37
|
exports.DeltaTemporalitySelector = DeltaTemporalitySelector;
|
|
38
|
+
const LowMemoryTemporalitySelector = (instrumentType) => {
|
|
39
|
+
switch (instrumentType) {
|
|
40
|
+
case sdk_metrics_1.InstrumentType.COUNTER:
|
|
41
|
+
case sdk_metrics_1.InstrumentType.HISTOGRAM:
|
|
42
|
+
return sdk_metrics_1.AggregationTemporality.DELTA;
|
|
43
|
+
case sdk_metrics_1.InstrumentType.UP_DOWN_COUNTER:
|
|
44
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:
|
|
45
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_COUNTER:
|
|
46
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_GAUGE:
|
|
47
|
+
return sdk_metrics_1.AggregationTemporality.CUMULATIVE;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.LowMemoryTemporalitySelector = LowMemoryTemporalitySelector;
|
|
37
51
|
function chooseTemporalitySelectorFromEnvironment() {
|
|
38
52
|
const env = (0, core_1.getEnv)();
|
|
39
53
|
const configuredTemporality = env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();
|
|
@@ -43,15 +57,21 @@ function chooseTemporalitySelectorFromEnvironment() {
|
|
|
43
57
|
if (configuredTemporality === 'delta') {
|
|
44
58
|
return exports.DeltaTemporalitySelector;
|
|
45
59
|
}
|
|
60
|
+
if (configuredTemporality === 'lowmemory') {
|
|
61
|
+
return exports.LowMemoryTemporalitySelector;
|
|
62
|
+
}
|
|
46
63
|
api_1.diag.warn(`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`);
|
|
47
64
|
return exports.CumulativeTemporalitySelector;
|
|
48
65
|
}
|
|
49
66
|
function chooseTemporalitySelector(temporalityPreference) {
|
|
50
67
|
// Directly passed preference has priority.
|
|
51
68
|
if (temporalityPreference != null) {
|
|
52
|
-
if (temporalityPreference ===
|
|
69
|
+
if (temporalityPreference === OTLPMetricExporterOptions_1.AggregationTemporalityPreference.DELTA) {
|
|
53
70
|
return exports.DeltaTemporalitySelector;
|
|
54
71
|
}
|
|
72
|
+
else if (temporalityPreference === OTLPMetricExporterOptions_1.AggregationTemporalityPreference.LOWMEMORY) {
|
|
73
|
+
return exports.LowMemoryTemporalitySelector;
|
|
74
|
+
}
|
|
55
75
|
return exports.CumulativeTemporalitySelector;
|
|
56
76
|
}
|
|
57
77
|
return chooseTemporalitySelectorFromEnvironment();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPMetricExporterBase.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterBase.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,8CAA2D;AAC3D,4DAMoC;
|
|
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AAC;IAED,4BAA4B,CAC1B,cAA8B;QAE9B,OAAO,IAAI,CAAC,+BAA+B,CAAC,cAAc,CAAC,CAAC;IAC9D,CAAC;CACF;AAtCD,wDAsCC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExportResult, getEnv } from '@opentelemetry/core';\nimport {\n AggregationTemporality,\n AggregationTemporalitySelector,\n InstrumentType,\n PushMetricExporter,\n ResourceMetrics,\n} from '@opentelemetry/sdk-metrics';\nimport {\n AggregationTemporalityPreference,\n OTLPMetricExporterOptions,\n} from './OTLPMetricExporterOptions';\nimport { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';\nimport { IExportMetricsServiceRequest } from '@opentelemetry/otlp-transformer';\nimport { diag } from '@opentelemetry/api';\n\nexport const CumulativeTemporalitySelector: AggregationTemporalitySelector =\n () => AggregationTemporality.CUMULATIVE;\n\nexport const DeltaTemporalitySelector: AggregationTemporalitySelector = (\n instrumentType: InstrumentType\n) => {\n switch (instrumentType) {\n case InstrumentType.COUNTER:\n case InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentType.HISTOGRAM:\n case InstrumentType.OBSERVABLE_GAUGE:\n return AggregationTemporality.DELTA;\n case InstrumentType.UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:\n return AggregationTemporality.CUMULATIVE;\n }\n};\n\nexport const LowMemoryTemporalitySelector: AggregationTemporalitySelector = (\n instrumentType: InstrumentType\n) => {\n switch (instrumentType) {\n case InstrumentType.COUNTER:\n case InstrumentType.HISTOGRAM:\n return AggregationTemporality.DELTA;\n case InstrumentType.UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentType.OBSERVABLE_GAUGE:\n return AggregationTemporality.CUMULATIVE;\n }\n};\n\nfunction chooseTemporalitySelectorFromEnvironment() {\n const env = getEnv();\n const configuredTemporality =\n env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();\n\n if (configuredTemporality === 'cumulative') {\n return CumulativeTemporalitySelector;\n }\n if (configuredTemporality === 'delta') {\n return DeltaTemporalitySelector;\n }\n if (configuredTemporality === 'lowmemory') {\n return LowMemoryTemporalitySelector;\n }\n\n diag.warn(\n `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`\n );\n return CumulativeTemporalitySelector;\n}\n\nfunction chooseTemporalitySelector(\n temporalityPreference?:\n | AggregationTemporalityPreference\n | AggregationTemporality\n): AggregationTemporalitySelector {\n // Directly passed preference has priority.\n if (temporalityPreference != null) {\n if (temporalityPreference === AggregationTemporalityPreference.DELTA) {\n return DeltaTemporalitySelector;\n } else if (\n temporalityPreference === AggregationTemporalityPreference.LOWMEMORY\n ) {\n return LowMemoryTemporalitySelector;\n }\n return CumulativeTemporalitySelector;\n }\n\n return chooseTemporalitySelectorFromEnvironment();\n}\n\nexport class OTLPMetricExporterBase<\n T extends OTLPExporterBase<\n OTLPMetricExporterOptions,\n ResourceMetrics,\n IExportMetricsServiceRequest\n >\n> implements PushMetricExporter\n{\n public _otlpExporter: T;\n private _aggregationTemporalitySelector: AggregationTemporalitySelector;\n\n constructor(exporter: T, config?: OTLPMetricExporterOptions) {\n this._otlpExporter = exporter;\n this._aggregationTemporalitySelector = chooseTemporalitySelector(\n config?.temporalityPreference\n );\n }\n\n export(\n metrics: ResourceMetrics,\n resultCallback: (result: ExportResult) => void\n ): void {\n this._otlpExporter.export([metrics], resultCallback);\n }\n\n async shutdown(): Promise<void> {\n await this._otlpExporter.shutdown();\n }\n\n forceFlush(): Promise<void> {\n return Promise.resolve();\n }\n\n selectAggregationTemporality(\n instrumentType: InstrumentType\n ): AggregationTemporality {\n return this._aggregationTemporalitySelector(instrumentType);\n }\n}\n"]}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { AggregationTemporality } from '@opentelemetry/sdk-metrics';
|
|
2
1
|
import { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
2
|
+
import { AggregationTemporality } from '@opentelemetry/sdk-metrics';
|
|
3
3
|
export interface OTLPMetricExporterOptions extends OTLPExporterConfigBase {
|
|
4
|
-
temporalityPreference?: AggregationTemporality;
|
|
4
|
+
temporalityPreference?: AggregationTemporalityPreference | AggregationTemporality;
|
|
5
|
+
}
|
|
6
|
+
export declare enum AggregationTemporalityPreference {
|
|
7
|
+
DELTA = 0,
|
|
8
|
+
CUMULATIVE = 1,
|
|
9
|
+
LOWMEMORY = 2
|
|
5
10
|
}
|
|
6
11
|
//# sourceMappingURL=OTLPMetricExporterOptions.d.ts.map
|
|
@@ -15,4 +15,11 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.AggregationTemporalityPreference = void 0;
|
|
19
|
+
var AggregationTemporalityPreference;
|
|
20
|
+
(function (AggregationTemporalityPreference) {
|
|
21
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["DELTA"] = 0] = "DELTA";
|
|
22
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["CUMULATIVE"] = 1] = "CUMULATIVE";
|
|
23
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["LOWMEMORY"] = 2] = "LOWMEMORY";
|
|
24
|
+
})(AggregationTemporalityPreference = exports.AggregationTemporalityPreference || (exports.AggregationTemporalityPreference = {}));
|
|
18
25
|
//# sourceMappingURL=OTLPMetricExporterOptions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPMetricExporterOptions.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterOptions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"OTLPMetricExporterOptions.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterOptions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAWH,IAAY,gCAIX;AAJD,WAAY,gCAAgC;IAC1C,yFAAK,CAAA;IACL,mGAAU,CAAA;IACV,iGAAS,CAAA;AACX,CAAC,EAJW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAI3C","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport { AggregationTemporality } from '@opentelemetry/sdk-metrics';\n\nexport interface OTLPMetricExporterOptions extends OTLPExporterConfigBase {\n temporalityPreference?:\n | AggregationTemporalityPreference\n | AggregationTemporality;\n}\n\nexport enum AggregationTemporalityPreference {\n DELTA,\n CUMULATIVE,\n LOWMEMORY,\n}\n"]}
|
package/build/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.41.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/src/version.js
CHANGED
package/build/src/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.41.1';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/exporter-metrics-otlp-http",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.1",
|
|
4
4
|
"description": "OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"module": "build/esm/index.js",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"tdd": "npm run test -- --watch-extensions ts --watch",
|
|
24
24
|
"tdd:browser": "karma start",
|
|
25
25
|
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
|
|
26
|
-
"test:browser": "
|
|
26
|
+
"test:browser": "karma start --single-run",
|
|
27
27
|
"version": "node ../../../scripts/version-update.js",
|
|
28
28
|
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
|
|
29
|
-
"precompile": "lerna run version --scope $
|
|
29
|
+
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
|
|
30
30
|
"prewatch": "npm run precompile",
|
|
31
31
|
"peer-api-check": "node ../../../scripts/peer-api-check.js",
|
|
32
32
|
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../"
|
|
@@ -63,43 +63,45 @@
|
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@babel/core": "7.
|
|
66
|
+
"@babel/core": "7.22.9",
|
|
67
67
|
"@opentelemetry/api": "1.4.1",
|
|
68
|
-
"@types/mocha": "10.0.
|
|
68
|
+
"@types/mocha": "10.0.1",
|
|
69
69
|
"@types/node": "18.6.5",
|
|
70
|
-
"@types/sinon": "10.0.
|
|
70
|
+
"@types/sinon": "10.0.15",
|
|
71
71
|
"@types/webpack-env": "1.16.3",
|
|
72
|
-
"babel-loader": "8.
|
|
72
|
+
"babel-loader": "8.3.0",
|
|
73
|
+
"babel-plugin-istanbul": "6.1.1",
|
|
73
74
|
"codecov": "3.8.3",
|
|
74
75
|
"cpx": "1.5.0",
|
|
75
|
-
"
|
|
76
|
-
"karma": "6.
|
|
76
|
+
"cross-var": "1.1.0",
|
|
77
|
+
"karma": "6.4.2",
|
|
77
78
|
"karma-chrome-launcher": "3.1.0",
|
|
78
|
-
"karma-coverage
|
|
79
|
+
"karma-coverage": "2.2.1",
|
|
79
80
|
"karma-mocha": "2.0.1",
|
|
80
|
-
"karma-spec-reporter": "0.0.
|
|
81
|
+
"karma-spec-reporter": "0.0.36",
|
|
81
82
|
"karma-webpack": "4.0.2",
|
|
82
|
-
"
|
|
83
|
+
"lerna": "7.1.3",
|
|
84
|
+
"mocha": "10.2.0",
|
|
83
85
|
"nyc": "15.1.0",
|
|
84
|
-
"sinon": "15.
|
|
86
|
+
"sinon": "15.1.2",
|
|
85
87
|
"ts-loader": "8.4.0",
|
|
86
88
|
"ts-mocha": "10.0.0",
|
|
87
89
|
"typescript": "4.4.4",
|
|
88
90
|
"webpack": "4.46.0",
|
|
89
|
-
"webpack-cli": "4.
|
|
90
|
-
"webpack-merge": "5.
|
|
91
|
+
"webpack-cli": "4.10.0",
|
|
92
|
+
"webpack-merge": "5.9.0"
|
|
91
93
|
},
|
|
92
94
|
"peerDependencies": {
|
|
93
95
|
"@opentelemetry/api": "^1.3.0"
|
|
94
96
|
},
|
|
95
97
|
"dependencies": {
|
|
96
|
-
"@opentelemetry/core": "1.
|
|
97
|
-
"@opentelemetry/otlp-exporter-base": "0.
|
|
98
|
-
"@opentelemetry/otlp-transformer": "0.
|
|
99
|
-
"@opentelemetry/resources": "1.
|
|
100
|
-
"@opentelemetry/sdk-metrics": "1.
|
|
98
|
+
"@opentelemetry/core": "1.15.1",
|
|
99
|
+
"@opentelemetry/otlp-exporter-base": "0.41.1",
|
|
100
|
+
"@opentelemetry/otlp-transformer": "0.41.1",
|
|
101
|
+
"@opentelemetry/resources": "1.15.1",
|
|
102
|
+
"@opentelemetry/sdk-metrics": "1.15.1"
|
|
101
103
|
},
|
|
102
104
|
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-http",
|
|
103
105
|
"sideEffects": false,
|
|
104
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "9f71800fdc2a5ee5055684037a12498af71955f2"
|
|
105
107
|
}
|