@opentelemetry/exporter-metrics-otlp-http 0.222.0-development.0 → 0.300.0-development.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.
Files changed (142) hide show
  1. package/README.md +0 -5
  2. package/dist/OTLPMetricExporterBase.cjs +71 -0
  3. package/dist/OTLPMetricExporterBase.cjs.map +1 -0
  4. package/dist/OTLPMetricExporterBase.d.cts +17 -0
  5. package/dist/OTLPMetricExporterBase.d.cts.map +1 -0
  6. package/dist/OTLPMetricExporterBase.d.mts +17 -0
  7. package/dist/OTLPMetricExporterBase.d.mts.map +1 -0
  8. package/dist/OTLPMetricExporterBase.mjs +68 -0
  9. package/dist/OTLPMetricExporterBase.mjs.map +1 -0
  10. package/dist/OTLPMetricExporterOptions.cjs +11 -0
  11. package/dist/OTLPMetricExporterOptions.cjs.map +1 -0
  12. package/dist/OTLPMetricExporterOptions.d.cts +15 -0
  13. package/dist/OTLPMetricExporterOptions.d.cts.map +1 -0
  14. package/dist/OTLPMetricExporterOptions.d.mts +15 -0
  15. package/dist/OTLPMetricExporterOptions.d.mts.map +1 -0
  16. package/dist/OTLPMetricExporterOptions.mjs +11 -0
  17. package/dist/OTLPMetricExporterOptions.mjs.map +1 -0
  18. package/dist/index.cjs +10 -0
  19. package/dist/index.d.cts +5 -0
  20. package/dist/index.d.mts +5 -0
  21. package/dist/index.mjs +4 -0
  22. package/dist/platform/browser/OTLPMetricExporter.cjs +26 -0
  23. package/dist/platform/browser/OTLPMetricExporter.cjs.map +1 -0
  24. package/dist/platform/browser/OTLPMetricExporter.d.cts +20 -0
  25. package/dist/platform/browser/OTLPMetricExporter.d.cts.map +1 -0
  26. package/dist/platform/browser/OTLPMetricExporter.d.mts +20 -0
  27. package/dist/platform/browser/OTLPMetricExporter.d.mts.map +1 -0
  28. package/dist/platform/browser/OTLPMetricExporter.mjs +26 -0
  29. package/dist/platform/browser/OTLPMetricExporter.mjs.map +1 -0
  30. package/dist/platform/browser/index.cjs +3 -0
  31. package/dist/platform/browser/index.d.cts +2 -0
  32. package/dist/platform/browser/index.d.mts +2 -0
  33. package/dist/platform/browser/index.mjs +2 -0
  34. package/dist/platform/index.cjs +3 -0
  35. package/dist/platform/index.d.cts +3 -0
  36. package/dist/platform/index.d.mts +3 -0
  37. package/dist/platform/index.mjs +2 -0
  38. package/dist/platform/node/OTLPMetricExporter.cjs +26 -0
  39. package/dist/platform/node/OTLPMetricExporter.cjs.map +1 -0
  40. package/dist/platform/node/OTLPMetricExporter.d.cts +20 -0
  41. package/dist/platform/node/OTLPMetricExporter.d.cts.map +1 -0
  42. package/dist/platform/node/OTLPMetricExporter.d.mts +20 -0
  43. package/dist/platform/node/OTLPMetricExporter.d.mts.map +1 -0
  44. package/dist/platform/node/OTLPMetricExporter.mjs +26 -0
  45. package/dist/platform/node/OTLPMetricExporter.mjs.map +1 -0
  46. package/dist/platform/node/index.d.cts +2 -0
  47. package/dist/platform/node/index.d.mts +2 -0
  48. package/dist/semconv.cjs +13 -0
  49. package/dist/semconv.cjs.map +1 -0
  50. package/dist/semconv.mjs +13 -0
  51. package/dist/semconv.mjs.map +1 -0
  52. package/package.json +57 -35
  53. package/build/esm/OTLPMetricExporterBase.d.ts +0 -16
  54. package/build/esm/OTLPMetricExporterBase.js +0 -86
  55. package/build/esm/OTLPMetricExporterBase.js.map +0 -1
  56. package/build/esm/OTLPMetricExporterOptions.d.ts +0 -12
  57. package/build/esm/OTLPMetricExporterOptions.js +0 -11
  58. package/build/esm/OTLPMetricExporterOptions.js.map +0 -1
  59. package/build/esm/index.d.ts +0 -5
  60. package/build/esm/index.js +0 -8
  61. package/build/esm/index.js.map +0 -1
  62. package/build/esm/platform/browser/OTLPMetricExporter.d.ts +0 -17
  63. package/build/esm/platform/browser/OTLPMetricExporter.js +0 -26
  64. package/build/esm/platform/browser/OTLPMetricExporter.js.map +0 -1
  65. package/build/esm/platform/browser/index.d.ts +0 -2
  66. package/build/esm/platform/browser/index.js +0 -6
  67. package/build/esm/platform/browser/index.js.map +0 -1
  68. package/build/esm/platform/index.d.ts +0 -2
  69. package/build/esm/platform/index.js +0 -6
  70. package/build/esm/platform/index.js.map +0 -1
  71. package/build/esm/platform/node/OTLPMetricExporter.d.ts +0 -17
  72. package/build/esm/platform/node/OTLPMetricExporter.js +0 -28
  73. package/build/esm/platform/node/OTLPMetricExporter.js.map +0 -1
  74. package/build/esm/platform/node/index.d.ts +0 -2
  75. package/build/esm/platform/node/index.js +0 -6
  76. package/build/esm/platform/node/index.js.map +0 -1
  77. package/build/esm/semconv.d.ts +0 -9
  78. package/build/esm/semconv.js +0 -18
  79. package/build/esm/semconv.js.map +0 -1
  80. package/build/esm/version.d.ts +0 -2
  81. package/build/esm/version.js +0 -7
  82. package/build/esm/version.js.map +0 -1
  83. package/build/esnext/OTLPMetricExporterBase.d.ts +0 -16
  84. package/build/esnext/OTLPMetricExporterBase.js +0 -86
  85. package/build/esnext/OTLPMetricExporterBase.js.map +0 -1
  86. package/build/esnext/OTLPMetricExporterOptions.d.ts +0 -12
  87. package/build/esnext/OTLPMetricExporterOptions.js +0 -11
  88. package/build/esnext/OTLPMetricExporterOptions.js.map +0 -1
  89. package/build/esnext/index.d.ts +0 -5
  90. package/build/esnext/index.js +0 -8
  91. package/build/esnext/index.js.map +0 -1
  92. package/build/esnext/platform/browser/OTLPMetricExporter.d.ts +0 -17
  93. package/build/esnext/platform/browser/OTLPMetricExporter.js +0 -26
  94. package/build/esnext/platform/browser/OTLPMetricExporter.js.map +0 -1
  95. package/build/esnext/platform/browser/index.d.ts +0 -2
  96. package/build/esnext/platform/browser/index.js +0 -6
  97. package/build/esnext/platform/browser/index.js.map +0 -1
  98. package/build/esnext/platform/index.d.ts +0 -2
  99. package/build/esnext/platform/index.js +0 -6
  100. package/build/esnext/platform/index.js.map +0 -1
  101. package/build/esnext/platform/node/OTLPMetricExporter.d.ts +0 -17
  102. package/build/esnext/platform/node/OTLPMetricExporter.js +0 -28
  103. package/build/esnext/platform/node/OTLPMetricExporter.js.map +0 -1
  104. package/build/esnext/platform/node/index.d.ts +0 -2
  105. package/build/esnext/platform/node/index.js +0 -6
  106. package/build/esnext/platform/node/index.js.map +0 -1
  107. package/build/esnext/semconv.d.ts +0 -9
  108. package/build/esnext/semconv.js +0 -18
  109. package/build/esnext/semconv.js.map +0 -1
  110. package/build/esnext/version.d.ts +0 -2
  111. package/build/esnext/version.js +0 -7
  112. package/build/esnext/version.js.map +0 -1
  113. package/build/src/OTLPMetricExporterBase.d.ts +0 -16
  114. package/build/src/OTLPMetricExporterBase.js +0 -93
  115. package/build/src/OTLPMetricExporterBase.js.map +0 -1
  116. package/build/src/OTLPMetricExporterOptions.d.ts +0 -12
  117. package/build/src/OTLPMetricExporterOptions.js +0 -14
  118. package/build/src/OTLPMetricExporterOptions.js.map +0 -1
  119. package/build/src/index.d.ts +0 -5
  120. package/build/src/index.js +0 -17
  121. package/build/src/index.js.map +0 -1
  122. package/build/src/platform/browser/OTLPMetricExporter.d.ts +0 -17
  123. package/build/src/platform/browser/OTLPMetricExporter.js +0 -30
  124. package/build/src/platform/browser/OTLPMetricExporter.js.map +0 -1
  125. package/build/src/platform/browser/index.d.ts +0 -2
  126. package/build/src/platform/browser/index.js +0 -10
  127. package/build/src/platform/browser/index.js.map +0 -1
  128. package/build/src/platform/index.d.ts +0 -2
  129. package/build/src/platform/index.js +0 -10
  130. package/build/src/platform/index.js.map +0 -1
  131. package/build/src/platform/node/OTLPMetricExporter.d.ts +0 -17
  132. package/build/src/platform/node/OTLPMetricExporter.js +0 -32
  133. package/build/src/platform/node/OTLPMetricExporter.js.map +0 -1
  134. package/build/src/platform/node/index.d.ts +0 -2
  135. package/build/src/platform/node/index.js +0 -10
  136. package/build/src/platform/node/index.js.map +0 -1
  137. package/build/src/semconv.d.ts +0 -9
  138. package/build/src/semconv.js +0 -21
  139. package/build/src/semconv.js.map +0 -1
  140. package/build/src/version.d.ts +0 -2
  141. package/build/src/version.js +0 -10
  142. package/build/src/version.js.map +0 -1
@@ -1,86 +0,0 @@
1
- /*
2
- * Copyright The OpenTelemetry Authors
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- import { getStringFromEnv } from '@opentelemetry/core';
6
- import { AggregationTemporality, InstrumentType, AggregationType, } from '@opentelemetry/sdk-metrics';
7
- import { AggregationTemporalityPreference } from './OTLPMetricExporterOptions';
8
- import { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
9
- import { diag } from '@opentelemetry/api';
10
- export const CumulativeTemporalitySelector = () => AggregationTemporality.CUMULATIVE;
11
- export const DeltaTemporalitySelector = (instrumentType) => {
12
- switch (instrumentType) {
13
- case InstrumentType.COUNTER:
14
- case InstrumentType.OBSERVABLE_COUNTER:
15
- case InstrumentType.GAUGE:
16
- case InstrumentType.HISTOGRAM:
17
- case InstrumentType.OBSERVABLE_GAUGE:
18
- return AggregationTemporality.DELTA;
19
- case InstrumentType.UP_DOWN_COUNTER:
20
- case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:
21
- return AggregationTemporality.CUMULATIVE;
22
- }
23
- };
24
- export const LowMemoryTemporalitySelector = (instrumentType) => {
25
- switch (instrumentType) {
26
- case InstrumentType.COUNTER:
27
- case InstrumentType.HISTOGRAM:
28
- return AggregationTemporality.DELTA;
29
- case InstrumentType.GAUGE:
30
- case InstrumentType.UP_DOWN_COUNTER:
31
- case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:
32
- case InstrumentType.OBSERVABLE_COUNTER:
33
- case InstrumentType.OBSERVABLE_GAUGE:
34
- return AggregationTemporality.CUMULATIVE;
35
- }
36
- };
37
- function chooseTemporalitySelectorFromEnvironment() {
38
- const configuredTemporality = (getStringFromEnv('OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE') ??
39
- 'cumulative').toLowerCase();
40
- if (configuredTemporality === 'cumulative') {
41
- return CumulativeTemporalitySelector;
42
- }
43
- if (configuredTemporality === 'delta') {
44
- return DeltaTemporalitySelector;
45
- }
46
- if (configuredTemporality === 'lowmemory') {
47
- return LowMemoryTemporalitySelector;
48
- }
49
- diag.warn(`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${configuredTemporality}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`);
50
- return CumulativeTemporalitySelector;
51
- }
52
- function chooseTemporalitySelector(temporalityPreference) {
53
- // Directly passed preference has priority.
54
- if (temporalityPreference != null) {
55
- if (temporalityPreference === AggregationTemporalityPreference.DELTA) {
56
- return DeltaTemporalitySelector;
57
- }
58
- else if (temporalityPreference === AggregationTemporalityPreference.LOWMEMORY) {
59
- return LowMemoryTemporalitySelector;
60
- }
61
- return CumulativeTemporalitySelector;
62
- }
63
- return chooseTemporalitySelectorFromEnvironment();
64
- }
65
- const DEFAULT_AGGREGATION = Object.freeze({
66
- type: AggregationType.DEFAULT,
67
- });
68
- function chooseAggregationSelector(config) {
69
- return config?.aggregationPreference ?? (() => DEFAULT_AGGREGATION);
70
- }
71
- export class OTLPMetricExporterBase extends OTLPExporterBase {
72
- _aggregationTemporalitySelector;
73
- _aggregationSelector;
74
- constructor(delegate, config) {
75
- super(delegate);
76
- this._aggregationSelector = chooseAggregationSelector(config);
77
- this._aggregationTemporalitySelector = chooseTemporalitySelector(config?.temporalityPreference);
78
- }
79
- selectAggregation(instrumentType) {
80
- return this._aggregationSelector(instrumentType);
81
- }
82
- selectAggregationTemporality(instrumentType) {
83
- return this._aggregationTemporalitySelector(instrumentType);
84
- }
85
- }
86
- //# sourceMappingURL=OTLPMetricExporterBase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OTLPMetricExporterBase.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterBase.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { getStringFromEnv } from '@opentelemetry/core';\nimport type {\n AggregationTemporalitySelector,\n PushMetricExporter,\n ResourceMetrics,\n AggregationSelector,\n AggregationOption,\n} from '@opentelemetry/sdk-metrics';\nimport {\n AggregationTemporality,\n InstrumentType,\n AggregationType,\n} from '@opentelemetry/sdk-metrics';\nimport type { OTLPMetricExporterOptions } from './OTLPMetricExporterOptions';\nimport { AggregationTemporalityPreference } from './OTLPMetricExporterOptions';\nimport type { IOtlpExportDelegate } from '@opentelemetry/otlp-exporter-base';\nimport { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';\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.GAUGE:\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.GAUGE:\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 configuredTemporality = (\n getStringFromEnv('OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE') ??\n 'cumulative'\n ).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 '${configuredTemporality}', 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\nconst DEFAULT_AGGREGATION = Object.freeze({\n type: AggregationType.DEFAULT,\n});\n\nfunction chooseAggregationSelector(\n config: OTLPMetricExporterOptions | undefined\n): AggregationSelector {\n return config?.aggregationPreference ?? (() => DEFAULT_AGGREGATION);\n}\n\nexport class OTLPMetricExporterBase\n extends OTLPExporterBase<ResourceMetrics>\n implements PushMetricExporter\n{\n private readonly _aggregationTemporalitySelector: AggregationTemporalitySelector;\n private readonly _aggregationSelector: AggregationSelector;\n\n constructor(\n delegate: IOtlpExportDelegate<ResourceMetrics>,\n config?: OTLPMetricExporterOptions\n ) {\n super(delegate);\n this._aggregationSelector = chooseAggregationSelector(config);\n this._aggregationTemporalitySelector = chooseTemporalitySelector(\n config?.temporalityPreference\n );\n }\n\n selectAggregation(instrumentType: InstrumentType): AggregationOption {\n return this._aggregationSelector(instrumentType);\n }\n\n selectAggregationTemporality(\n instrumentType: InstrumentType\n ): AggregationTemporality {\n return this._aggregationTemporalitySelector(instrumentType);\n }\n}\n"]}
@@ -1,12 +0,0 @@
1
- import type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
2
- import type { AggregationTemporality, AggregationSelector } from '@opentelemetry/sdk-metrics';
3
- export interface OTLPMetricExporterOptions extends OTLPExporterConfigBase {
4
- temporalityPreference?: AggregationTemporalityPreference | AggregationTemporality;
5
- aggregationPreference?: AggregationSelector;
6
- }
7
- export declare enum AggregationTemporalityPreference {
8
- DELTA = 0,
9
- CUMULATIVE = 1,
10
- LOWMEMORY = 2
11
- }
12
- //# sourceMappingURL=OTLPMetricExporterOptions.d.ts.map
@@ -1,11 +0,0 @@
1
- /*
2
- * Copyright The OpenTelemetry Authors
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- export var AggregationTemporalityPreference;
6
- (function (AggregationTemporalityPreference) {
7
- AggregationTemporalityPreference[AggregationTemporalityPreference["DELTA"] = 0] = "DELTA";
8
- AggregationTemporalityPreference[AggregationTemporalityPreference["CUMULATIVE"] = 1] = "CUMULATIVE";
9
- AggregationTemporalityPreference[AggregationTemporalityPreference["LOWMEMORY"] = 2] = "LOWMEMORY";
10
- })(AggregationTemporalityPreference || (AggregationTemporalityPreference = {}));
11
- //# sourceMappingURL=OTLPMetricExporterOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OTLPMetricExporterOptions.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterOptions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,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 * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport type {\n AggregationTemporality,\n AggregationSelector,\n} from '@opentelemetry/sdk-metrics';\n\nexport interface OTLPMetricExporterOptions extends OTLPExporterConfigBase {\n temporalityPreference?:\n | AggregationTemporalityPreference\n | AggregationTemporality;\n aggregationPreference?: AggregationSelector;\n}\n\nexport enum AggregationTemporalityPreference {\n DELTA,\n CUMULATIVE,\n LOWMEMORY,\n}\n"]}
@@ -1,5 +0,0 @@
1
- export { OTLPMetricExporter } from './platform';
2
- export { AggregationTemporalityPreference } from './OTLPMetricExporterOptions';
3
- export type { OTLPMetricExporterOptions } from './OTLPMetricExporterOptions';
4
- export { CumulativeTemporalitySelector, DeltaTemporalitySelector, LowMemoryTemporalitySelector, OTLPMetricExporterBase, } from './OTLPMetricExporterBase';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1,8 +0,0 @@
1
- /*
2
- * Copyright The OpenTelemetry Authors
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- export { OTLPMetricExporter } from './platform';
6
- export { AggregationTemporalityPreference } from './OTLPMetricExporterOptions';
7
- export { CumulativeTemporalitySelector, DeltaTemporalitySelector, LowMemoryTemporalitySelector, OTLPMetricExporterBase, } from './OTLPMetricExporterBase';
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAE/E,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,0BAA0B,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { OTLPMetricExporter } from './platform';\nexport { AggregationTemporalityPreference } from './OTLPMetricExporterOptions';\nexport type { OTLPMetricExporterOptions } from './OTLPMetricExporterOptions';\nexport {\n CumulativeTemporalitySelector,\n DeltaTemporalitySelector,\n LowMemoryTemporalitySelector,\n OTLPMetricExporterBase,\n} from './OTLPMetricExporterBase';\n"]}
@@ -1,17 +0,0 @@
1
- import { type MeterProvider } from '@opentelemetry/api';
2
- import type { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';
3
- import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';
4
- import type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
5
- /**
6
- * Collector Metric Exporter for Web
7
- */
8
- export declare class OTLPMetricExporter extends OTLPMetricExporterBase {
9
- private readonly _url;
10
- constructor(config?: OTLPExporterConfigBase & OTLPMetricExporterOptions);
11
- /**
12
- * Sets the meter provider to use to collect metrics for the exporter itself.
13
- * @experimental This method is experimental and is subject to breaking changes in minor releases.
14
- */
15
- setSelfObsMeterProvider(meterProvider: MeterProvider): void;
16
- }
17
- //# sourceMappingURL=OTLPMetricExporter.d.ts.map
@@ -1,26 +0,0 @@
1
- /*
2
- * Copyright The OpenTelemetry Authors
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';
6
- import { JsonMetricsSerializer, MetricsExporterMetricsHelper, } from '@opentelemetry/otlp-transformer';
7
- import { createLegacyOtlpBrowserExportDelegate, createLegacyOtlpBrowserExporterMetrics, } from '@opentelemetry/otlp-exporter-base/browser-http';
8
- import { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER } from '../../semconv';
9
- /**
10
- * Collector Metric Exporter for Web
11
- */
12
- export class OTLPMetricExporter extends OTLPMetricExporterBase {
13
- _url;
14
- constructor(config) {
15
- super(createLegacyOtlpBrowserExportDelegate(config ?? {}, JsonMetricsSerializer, OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER, MetricsExporterMetricsHelper, config?.selfObsMeterProvider, 'v1/metrics', { 'Content-Type': 'application/json' }), config);
16
- this._url = config?.url;
17
- }
18
- /**
19
- * Sets the meter provider to use to collect metrics for the exporter itself.
20
- * @experimental This method is experimental and is subject to breaking changes in minor releases.
21
- */
22
- setSelfObsMeterProvider(meterProvider) {
23
- this.setMetrics(createLegacyOtlpBrowserExporterMetrics(OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER, MetricsExporterMetricsHelper, this._url, meterProvider));
24
- }
25
- }
26
- //# sourceMappingURL=OTLPMetricExporter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPMetricExporter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,OAAO,EACL,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,qCAAqC,EACrC,sCAAsC,GACvC,MAAM,gDAAgD,CAAC;AAExD,OAAO,EAAE,mDAAmD,EAAE,MAAM,eAAe,CAAC;AAEpF;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,sBAAsB;IAC3C,IAAI,CAAqB;IAC1C,YAAY,MAA2D;QACrE,KAAK,CACH,qCAAqC,CACnC,MAAM,IAAI,EAAE,EACZ,qBAAqB,EACrB,mDAAmD,EACnD,4BAA4B,EAC5B,MAAM,EAAE,oBAAoB,EAC5B,YAAY,EACZ,EAAE,cAAc,EAAE,kBAAkB,EAAE,CACvC,EACD,MAAM,CACP,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,MAAM,EAAE,GAAG,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACH,uBAAuB,CAAC,aAA4B;QAClD,IAAI,CAAC,UAAU,CACb,sCAAsC,CACpC,mDAAmD,EACnD,4BAA4B,EAC5B,IAAI,CAAC,IAAI,EACT,aAAa,CACd,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { type MeterProvider } from '@opentelemetry/api';\nimport type { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport {\n JsonMetricsSerializer,\n MetricsExporterMetricsHelper,\n} from '@opentelemetry/otlp-transformer';\nimport {\n createLegacyOtlpBrowserExportDelegate,\n createLegacyOtlpBrowserExporterMetrics,\n} from '@opentelemetry/otlp-exporter-base/browser-http';\n\nimport { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER } from '../../semconv';\n\n/**\n * Collector Metric Exporter for Web\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase {\n private readonly _url: string | undefined;\n constructor(config?: OTLPExporterConfigBase & OTLPMetricExporterOptions) {\n super(\n createLegacyOtlpBrowserExportDelegate(\n config ?? {},\n JsonMetricsSerializer,\n OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER,\n MetricsExporterMetricsHelper,\n config?.selfObsMeterProvider,\n 'v1/metrics',\n { 'Content-Type': 'application/json' }\n ),\n config\n );\n this._url = config?.url;\n }\n\n /**\n * Sets the meter provider to use to collect metrics for the exporter itself.\n * @experimental This method is experimental and is subject to breaking changes in minor releases.\n */\n setSelfObsMeterProvider(meterProvider: MeterProvider) {\n this.setMetrics(\n createLegacyOtlpBrowserExporterMetrics(\n OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER,\n MetricsExporterMetricsHelper,\n this._url,\n meterProvider\n )\n );\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- export { OTLPMetricExporter } from './OTLPMetricExporter';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,6 +0,0 @@
1
- /*
2
- * Copyright The OpenTelemetry Authors
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- export { OTLPMetricExporter } from './OTLPMetricExporter';
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { OTLPMetricExporter } from './OTLPMetricExporter';\n"]}
@@ -1,2 +0,0 @@
1
- export { OTLPMetricExporter } from './node';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,6 +0,0 @@
1
- /*
2
- * Copyright The OpenTelemetry Authors
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- export { OTLPMetricExporter } from './node';
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { OTLPMetricExporter } from './node';\n"]}
@@ -1,17 +0,0 @@
1
- import { type MeterProvider } from '@opentelemetry/api';
2
- import type { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';
3
- import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';
4
- import type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';
5
- /**
6
- * OTLP Metric Exporter for Node.js
7
- */
8
- export declare class OTLPMetricExporter extends OTLPMetricExporterBase {
9
- private readonly _url;
10
- constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions);
11
- /**
12
- * Sets the meter provider to use to collect metrics for the exporter itself.
13
- * @experimental This method is experimental and is subject to breaking changes in minor releases.
14
- */
15
- setSelfObsMeterProvider(meterProvider: MeterProvider): void;
16
- }
17
- //# sourceMappingURL=OTLPMetricExporter.d.ts.map
@@ -1,28 +0,0 @@
1
- /*
2
- * Copyright The OpenTelemetry Authors
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';
6
- import { JsonMetricsSerializer, MetricsExporterMetricsHelper, } from '@opentelemetry/otlp-transformer';
7
- import { convertLegacyHttpOptions, createOtlpHttpExportDelegate, createOtlpHttpExporterMetrics, } from '@opentelemetry/otlp-exporter-base/node-http';
8
- import { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER } from '../../semconv';
9
- /**
10
- * OTLP Metric Exporter for Node.js
11
- */
12
- export class OTLPMetricExporter extends OTLPMetricExporterBase {
13
- _url;
14
- constructor(config) {
15
- super(createOtlpHttpExportDelegate(convertLegacyHttpOptions(config ?? {}, 'METRICS', 'v1/metrics', {
16
- 'Content-Type': 'application/json',
17
- }), JsonMetricsSerializer, OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER, MetricsExporterMetricsHelper, config?.selfObsMeterProvider), config);
18
- this._url = config?.url;
19
- }
20
- /**
21
- * Sets the meter provider to use to collect metrics for the exporter itself.
22
- * @experimental This method is experimental and is subject to breaking changes in minor releases.
23
- */
24
- setSelfObsMeterProvider(meterProvider) {
25
- this.setMetrics(createOtlpHttpExporterMetrics(OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER, MetricsExporterMetricsHelper, this._url, meterProvider));
26
- }
27
- }
28
- //# sourceMappingURL=OTLPMetricExporter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPMetricExporter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,OAAO,EACL,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,mDAAmD,EAAE,MAAM,eAAe,CAAC;AAEpF;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,sBAAsB;IAC3C,IAAI,CAAqB;IAC1C,YAAY,MAA+D;QACzE,KAAK,CACH,4BAA4B,CAC1B,wBAAwB,CAAC,MAAM,IAAI,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE;YAC9D,cAAc,EAAE,kBAAkB;SACnC,CAAC,EACF,qBAAqB,EACrB,mDAAmD,EACnD,4BAA4B,EAC5B,MAAM,EAAE,oBAAoB,CAC7B,EACD,MAAM,CACP,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,MAAM,EAAE,GAAG,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACH,uBAAuB,CAAC,aAA4B;QAClD,IAAI,CAAC,UAAU,CACb,6BAA6B,CAC3B,mDAAmD,EACnD,4BAA4B,EAC5B,IAAI,CAAC,IAAI,EACT,aAAa,CACd,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { type MeterProvider } from '@opentelemetry/api';\nimport type { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport {\n JsonMetricsSerializer,\n MetricsExporterMetricsHelper,\n} from '@opentelemetry/otlp-transformer';\nimport {\n convertLegacyHttpOptions,\n createOtlpHttpExportDelegate,\n createOtlpHttpExporterMetrics,\n} from '@opentelemetry/otlp-exporter-base/node-http';\n\nimport { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER } from '../../semconv';\n\n/**\n * OTLP Metric Exporter for Node.js\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase {\n private readonly _url: string | undefined;\n constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions) {\n super(\n createOtlpHttpExportDelegate(\n convertLegacyHttpOptions(config ?? {}, 'METRICS', 'v1/metrics', {\n 'Content-Type': 'application/json',\n }),\n JsonMetricsSerializer,\n OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER,\n MetricsExporterMetricsHelper,\n config?.selfObsMeterProvider\n ),\n config\n );\n this._url = config?.url;\n }\n\n /**\n * Sets the meter provider to use to collect metrics for the exporter itself.\n * @experimental This method is experimental and is subject to breaking changes in minor releases.\n */\n setSelfObsMeterProvider(meterProvider: MeterProvider) {\n this.setMetrics(\n createOtlpHttpExporterMetrics(\n OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER,\n MetricsExporterMetricsHelper,\n this._url,\n meterProvider\n )\n );\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- export { OTLPMetricExporter } from './OTLPMetricExporter';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,6 +0,0 @@
1
- /*
2
- * Copyright The OpenTelemetry Authors
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- export { OTLPMetricExporter } from './OTLPMetricExporter';
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { OTLPMetricExporter } from './OTLPMetricExporter';\n"]}
@@ -1,9 +0,0 @@
1
- /**
2
- * Enum value "otlp_http_metric_exporter" for attribute {@link ATTR_OTEL_COMPONENT_TYPE}.
3
- *
4
- * OTLP metric exporter over HTTP with protobuf serialization
5
- *
6
- * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
7
- */
8
- export declare const OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER: "otlp_http_metric_exporter";
9
- //# sourceMappingURL=semconv.d.ts.map
@@ -1,18 +0,0 @@
1
- /*
2
- * Copyright The OpenTelemetry Authors
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- /*
6
- * This file contains a copy of unstable semantic convention definitions
7
- * used by this package.
8
- * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
9
- */
10
- /**
11
- * Enum value "otlp_http_metric_exporter" for attribute {@link ATTR_OTEL_COMPONENT_TYPE}.
12
- *
13
- * OTLP metric exporter over HTTP with protobuf serialization
14
- *
15
- * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
16
- */
17
- export const OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER = 'otlp_http_metric_exporter';
18
- //# sourceMappingURL=semconv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"semconv.js","sourceRoot":"","sources":["../../src/semconv.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mDAAmD,GAC9D,2BAAoC,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n/**\n * Enum value \"otlp_http_metric_exporter\" for attribute {@link ATTR_OTEL_COMPONENT_TYPE}.\n *\n * OTLP metric exporter over HTTP with protobuf serialization\n *\n * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER =\n 'otlp_http_metric_exporter' as const;\n"]}
@@ -1,2 +0,0 @@
1
- export declare const VERSION = "0.222.0-development.0";
2
- //# sourceMappingURL=version.d.ts.map
@@ -1,7 +0,0 @@
1
- /*
2
- * Copyright The OpenTelemetry Authors
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- // this is autogenerated file, see scripts/version-update.js
6
- export const VERSION = '0.222.0-development.0';
7
- //# sourceMappingURL=version.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,uBAAuB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.222.0-development.0';\n"]}
@@ -1,16 +0,0 @@
1
- import type { AggregationTemporalitySelector, PushMetricExporter, ResourceMetrics, AggregationOption } from '@opentelemetry/sdk-metrics';
2
- import { AggregationTemporality, InstrumentType } from '@opentelemetry/sdk-metrics';
3
- import type { OTLPMetricExporterOptions } from './OTLPMetricExporterOptions';
4
- import type { IOtlpExportDelegate } from '@opentelemetry/otlp-exporter-base';
5
- import { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
6
- export declare const CumulativeTemporalitySelector: AggregationTemporalitySelector;
7
- export declare const DeltaTemporalitySelector: AggregationTemporalitySelector;
8
- export declare const LowMemoryTemporalitySelector: AggregationTemporalitySelector;
9
- export declare class OTLPMetricExporterBase extends OTLPExporterBase<ResourceMetrics> implements PushMetricExporter {
10
- private readonly _aggregationTemporalitySelector;
11
- private readonly _aggregationSelector;
12
- constructor(delegate: IOtlpExportDelegate<ResourceMetrics>, config?: OTLPMetricExporterOptions);
13
- selectAggregation(instrumentType: InstrumentType): AggregationOption;
14
- selectAggregationTemporality(instrumentType: InstrumentType): AggregationTemporality;
15
- }
16
- //# sourceMappingURL=OTLPMetricExporterBase.d.ts.map
@@ -1,93 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright The OpenTelemetry Authors
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.OTLPMetricExporterBase = exports.LowMemoryTemporalitySelector = exports.DeltaTemporalitySelector = exports.CumulativeTemporalitySelector = void 0;
8
- const core_1 = require("@opentelemetry/core");
9
- const sdk_metrics_1 = require("@opentelemetry/sdk-metrics");
10
- const OTLPMetricExporterOptions_1 = require("./OTLPMetricExporterOptions");
11
- const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
12
- const api_1 = require("@opentelemetry/api");
13
- const CumulativeTemporalitySelector = () => sdk_metrics_1.AggregationTemporality.CUMULATIVE;
14
- exports.CumulativeTemporalitySelector = CumulativeTemporalitySelector;
15
- const DeltaTemporalitySelector = (instrumentType) => {
16
- switch (instrumentType) {
17
- case sdk_metrics_1.InstrumentType.COUNTER:
18
- case sdk_metrics_1.InstrumentType.OBSERVABLE_COUNTER:
19
- case sdk_metrics_1.InstrumentType.GAUGE:
20
- case sdk_metrics_1.InstrumentType.HISTOGRAM:
21
- case sdk_metrics_1.InstrumentType.OBSERVABLE_GAUGE:
22
- return sdk_metrics_1.AggregationTemporality.DELTA;
23
- case sdk_metrics_1.InstrumentType.UP_DOWN_COUNTER:
24
- case sdk_metrics_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:
25
- return sdk_metrics_1.AggregationTemporality.CUMULATIVE;
26
- }
27
- };
28
- exports.DeltaTemporalitySelector = DeltaTemporalitySelector;
29
- const LowMemoryTemporalitySelector = (instrumentType) => {
30
- switch (instrumentType) {
31
- case sdk_metrics_1.InstrumentType.COUNTER:
32
- case sdk_metrics_1.InstrumentType.HISTOGRAM:
33
- return sdk_metrics_1.AggregationTemporality.DELTA;
34
- case sdk_metrics_1.InstrumentType.GAUGE:
35
- case sdk_metrics_1.InstrumentType.UP_DOWN_COUNTER:
36
- case sdk_metrics_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:
37
- case sdk_metrics_1.InstrumentType.OBSERVABLE_COUNTER:
38
- case sdk_metrics_1.InstrumentType.OBSERVABLE_GAUGE:
39
- return sdk_metrics_1.AggregationTemporality.CUMULATIVE;
40
- }
41
- };
42
- exports.LowMemoryTemporalitySelector = LowMemoryTemporalitySelector;
43
- function chooseTemporalitySelectorFromEnvironment() {
44
- const configuredTemporality = ((0, core_1.getStringFromEnv)('OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE') ??
45
- 'cumulative').toLowerCase();
46
- if (configuredTemporality === 'cumulative') {
47
- return exports.CumulativeTemporalitySelector;
48
- }
49
- if (configuredTemporality === 'delta') {
50
- return exports.DeltaTemporalitySelector;
51
- }
52
- if (configuredTemporality === 'lowmemory') {
53
- return exports.LowMemoryTemporalitySelector;
54
- }
55
- api_1.diag.warn(`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${configuredTemporality}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`);
56
- return exports.CumulativeTemporalitySelector;
57
- }
58
- function chooseTemporalitySelector(temporalityPreference) {
59
- // Directly passed preference has priority.
60
- if (temporalityPreference != null) {
61
- if (temporalityPreference === OTLPMetricExporterOptions_1.AggregationTemporalityPreference.DELTA) {
62
- return exports.DeltaTemporalitySelector;
63
- }
64
- else if (temporalityPreference === OTLPMetricExporterOptions_1.AggregationTemporalityPreference.LOWMEMORY) {
65
- return exports.LowMemoryTemporalitySelector;
66
- }
67
- return exports.CumulativeTemporalitySelector;
68
- }
69
- return chooseTemporalitySelectorFromEnvironment();
70
- }
71
- const DEFAULT_AGGREGATION = Object.freeze({
72
- type: sdk_metrics_1.AggregationType.DEFAULT,
73
- });
74
- function chooseAggregationSelector(config) {
75
- return config?.aggregationPreference ?? (() => DEFAULT_AGGREGATION);
76
- }
77
- class OTLPMetricExporterBase extends otlp_exporter_base_1.OTLPExporterBase {
78
- _aggregationTemporalitySelector;
79
- _aggregationSelector;
80
- constructor(delegate, config) {
81
- super(delegate);
82
- this._aggregationSelector = chooseAggregationSelector(config);
83
- this._aggregationTemporalitySelector = chooseTemporalitySelector(config?.temporalityPreference);
84
- }
85
- selectAggregation(instrumentType) {
86
- return this._aggregationSelector(instrumentType);
87
- }
88
- selectAggregationTemporality(instrumentType) {
89
- return this._aggregationTemporalitySelector(instrumentType);
90
- }
91
- }
92
- exports.OTLPMetricExporterBase = OTLPMetricExporterBase;
93
- //# sourceMappingURL=OTLPMetricExporterBase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OTLPMetricExporterBase.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterBase.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { getStringFromEnv } from '@opentelemetry/core';\nimport type {\n AggregationTemporalitySelector,\n PushMetricExporter,\n ResourceMetrics,\n AggregationSelector,\n AggregationOption,\n} from '@opentelemetry/sdk-metrics';\nimport {\n AggregationTemporality,\n InstrumentType,\n AggregationType,\n} from '@opentelemetry/sdk-metrics';\nimport type { OTLPMetricExporterOptions } from './OTLPMetricExporterOptions';\nimport { AggregationTemporalityPreference } from './OTLPMetricExporterOptions';\nimport type { IOtlpExportDelegate } from '@opentelemetry/otlp-exporter-base';\nimport { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';\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.GAUGE:\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.GAUGE:\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 configuredTemporality = (\n getStringFromEnv('OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE') ??\n 'cumulative'\n ).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 '${configuredTemporality}', 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\nconst DEFAULT_AGGREGATION = Object.freeze({\n type: AggregationType.DEFAULT,\n});\n\nfunction chooseAggregationSelector(\n config: OTLPMetricExporterOptions | undefined\n): AggregationSelector {\n return config?.aggregationPreference ?? (() => DEFAULT_AGGREGATION);\n}\n\nexport class OTLPMetricExporterBase\n extends OTLPExporterBase<ResourceMetrics>\n implements PushMetricExporter\n{\n private readonly _aggregationTemporalitySelector: AggregationTemporalitySelector;\n private readonly _aggregationSelector: AggregationSelector;\n\n constructor(\n delegate: IOtlpExportDelegate<ResourceMetrics>,\n config?: OTLPMetricExporterOptions\n ) {\n super(delegate);\n this._aggregationSelector = chooseAggregationSelector(config);\n this._aggregationTemporalitySelector = chooseTemporalitySelector(\n config?.temporalityPreference\n );\n }\n\n selectAggregation(instrumentType: InstrumentType): AggregationOption {\n return this._aggregationSelector(instrumentType);\n }\n\n selectAggregationTemporality(\n instrumentType: InstrumentType\n ): AggregationTemporality {\n return this._aggregationTemporalitySelector(instrumentType);\n }\n}\n"]}
@@ -1,12 +0,0 @@
1
- import type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
2
- import type { AggregationTemporality, AggregationSelector } from '@opentelemetry/sdk-metrics';
3
- export interface OTLPMetricExporterOptions extends OTLPExporterConfigBase {
4
- temporalityPreference?: AggregationTemporalityPreference | AggregationTemporality;
5
- aggregationPreference?: AggregationSelector;
6
- }
7
- export declare enum AggregationTemporalityPreference {
8
- DELTA = 0,
9
- CUMULATIVE = 1,
10
- LOWMEMORY = 2
11
- }
12
- //# sourceMappingURL=OTLPMetricExporterOptions.d.ts.map
@@ -1,14 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright The OpenTelemetry Authors
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.AggregationTemporalityPreference = void 0;
8
- var AggregationTemporalityPreference;
9
- (function (AggregationTemporalityPreference) {
10
- AggregationTemporalityPreference[AggregationTemporalityPreference["DELTA"] = 0] = "DELTA";
11
- AggregationTemporalityPreference[AggregationTemporalityPreference["CUMULATIVE"] = 1] = "CUMULATIVE";
12
- AggregationTemporalityPreference[AggregationTemporalityPreference["LOWMEMORY"] = 2] = "LOWMEMORY";
13
- })(AggregationTemporalityPreference || (exports.AggregationTemporalityPreference = AggregationTemporalityPreference = {}));
14
- //# sourceMappingURL=OTLPMetricExporterOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OTLPMetricExporterOptions.js","sourceRoot":"","sources":["../../src/OTLPMetricExporterOptions.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAeH,IAAY,gCAIX;AAJD,WAAY,gCAAgC;IAC1C,yFAAK,CAAA;IACL,mGAAU,CAAA;IACV,iGAAS,CAAA;AACX,CAAC,EAJW,gCAAgC,gDAAhC,gCAAgC,QAI3C","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport type {\n AggregationTemporality,\n AggregationSelector,\n} from '@opentelemetry/sdk-metrics';\n\nexport interface OTLPMetricExporterOptions extends OTLPExporterConfigBase {\n temporalityPreference?:\n | AggregationTemporalityPreference\n | AggregationTemporality;\n aggregationPreference?: AggregationSelector;\n}\n\nexport enum AggregationTemporalityPreference {\n DELTA,\n CUMULATIVE,\n LOWMEMORY,\n}\n"]}
@@ -1,5 +0,0 @@
1
- export { OTLPMetricExporter } from './platform';
2
- export { AggregationTemporalityPreference } from './OTLPMetricExporterOptions';
3
- export type { OTLPMetricExporterOptions } from './OTLPMetricExporterOptions';
4
- export { CumulativeTemporalitySelector, DeltaTemporalitySelector, LowMemoryTemporalitySelector, OTLPMetricExporterBase, } from './OTLPMetricExporterBase';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1,17 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright The OpenTelemetry Authors
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.OTLPMetricExporterBase = exports.LowMemoryTemporalitySelector = exports.DeltaTemporalitySelector = exports.CumulativeTemporalitySelector = exports.AggregationTemporalityPreference = exports.OTLPMetricExporter = void 0;
8
- var platform_1 = require("./platform");
9
- Object.defineProperty(exports, "OTLPMetricExporter", { enumerable: true, get: function () { return platform_1.OTLPMetricExporter; } });
10
- var OTLPMetricExporterOptions_1 = require("./OTLPMetricExporterOptions");
11
- Object.defineProperty(exports, "AggregationTemporalityPreference", { enumerable: true, get: function () { return OTLPMetricExporterOptions_1.AggregationTemporalityPreference; } });
12
- var OTLPMetricExporterBase_1 = require("./OTLPMetricExporterBase");
13
- Object.defineProperty(exports, "CumulativeTemporalitySelector", { enumerable: true, get: function () { return OTLPMetricExporterBase_1.CumulativeTemporalitySelector; } });
14
- Object.defineProperty(exports, "DeltaTemporalitySelector", { enumerable: true, get: function () { return OTLPMetricExporterBase_1.DeltaTemporalitySelector; } });
15
- Object.defineProperty(exports, "LowMemoryTemporalitySelector", { enumerable: true, get: function () { return OTLPMetricExporterBase_1.LowMemoryTemporalitySelector; } });
16
- Object.defineProperty(exports, "OTLPMetricExporterBase", { enumerable: true, get: function () { return OTLPMetricExporterBase_1.OTLPMetricExporterBase; } });
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAAgD;AAAvC,8GAAA,kBAAkB,OAAA;AAC3B,yEAA+E;AAAtE,6IAAA,gCAAgC,OAAA;AAEzC,mEAKkC;AAJhC,uIAAA,6BAA6B,OAAA;AAC7B,kIAAA,wBAAwB,OAAA;AACxB,sIAAA,4BAA4B,OAAA;AAC5B,gIAAA,sBAAsB,OAAA","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { OTLPMetricExporter } from './platform';\nexport { AggregationTemporalityPreference } from './OTLPMetricExporterOptions';\nexport type { OTLPMetricExporterOptions } from './OTLPMetricExporterOptions';\nexport {\n CumulativeTemporalitySelector,\n DeltaTemporalitySelector,\n LowMemoryTemporalitySelector,\n OTLPMetricExporterBase,\n} from './OTLPMetricExporterBase';\n"]}
@@ -1,17 +0,0 @@
1
- import { type MeterProvider } from '@opentelemetry/api';
2
- import type { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';
3
- import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';
4
- import type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
5
- /**
6
- * Collector Metric Exporter for Web
7
- */
8
- export declare class OTLPMetricExporter extends OTLPMetricExporterBase {
9
- private readonly _url;
10
- constructor(config?: OTLPExporterConfigBase & OTLPMetricExporterOptions);
11
- /**
12
- * Sets the meter provider to use to collect metrics for the exporter itself.
13
- * @experimental This method is experimental and is subject to breaking changes in minor releases.
14
- */
15
- setSelfObsMeterProvider(meterProvider: MeterProvider): void;
16
- }
17
- //# sourceMappingURL=OTLPMetricExporter.d.ts.map
@@ -1,30 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright The OpenTelemetry Authors
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.OTLPMetricExporter = void 0;
8
- const OTLPMetricExporterBase_1 = require("../../OTLPMetricExporterBase");
9
- const otlp_transformer_1 = require("@opentelemetry/otlp-transformer");
10
- const browser_http_1 = require("@opentelemetry/otlp-exporter-base/browser-http");
11
- const semconv_1 = require("../../semconv");
12
- /**
13
- * Collector Metric Exporter for Web
14
- */
15
- class OTLPMetricExporter extends OTLPMetricExporterBase_1.OTLPMetricExporterBase {
16
- _url;
17
- constructor(config) {
18
- super((0, browser_http_1.createLegacyOtlpBrowserExportDelegate)(config ?? {}, otlp_transformer_1.JsonMetricsSerializer, semconv_1.OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER, otlp_transformer_1.MetricsExporterMetricsHelper, config?.selfObsMeterProvider, 'v1/metrics', { 'Content-Type': 'application/json' }), config);
19
- this._url = config?.url;
20
- }
21
- /**
22
- * Sets the meter provider to use to collect metrics for the exporter itself.
23
- * @experimental This method is experimental and is subject to breaking changes in minor releases.
24
- */
25
- setSelfObsMeterProvider(meterProvider) {
26
- this.setMetrics((0, browser_http_1.createLegacyOtlpBrowserExporterMetrics)(semconv_1.OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_METRIC_EXPORTER, otlp_transformer_1.MetricsExporterMetricsHelper, this._url, meterProvider));
27
- }
28
- }
29
- exports.OTLPMetricExporter = OTLPMetricExporter;
30
- //# sourceMappingURL=OTLPMetricExporter.js.map