@opentelemetry/otlp-exporter-base 0.301.2 → 0.302.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ExporterMetrics.cjs +1 -2
- package/dist/ExporterMetrics.cjs.map +1 -1
- package/dist/ExporterMetrics.d.cts +2 -5
- package/dist/ExporterMetrics.d.cts.map +1 -1
- package/dist/ExporterMetrics.d.mts +2 -5
- package/dist/ExporterMetrics.d.mts.map +1 -1
- package/dist/ExporterMetrics.mjs +1 -2
- package/dist/ExporterMetrics.mjs.map +1 -1
- package/dist/OTLPExporterBase.cjs +1 -2
- package/dist/OTLPExporterBase.cjs.map +1 -1
- package/dist/OTLPExporterBase.d.cts +2 -5
- package/dist/OTLPExporterBase.d.cts.map +1 -1
- package/dist/OTLPExporterBase.d.mts +2 -5
- package/dist/OTLPExporterBase.d.mts.map +1 -1
- package/dist/OTLPExporterBase.mjs +1 -2
- package/dist/OTLPExporterBase.mjs.map +1 -1
- package/dist/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/bounded-queue-export-promise-handler.cjs +1 -2
- package/dist/bounded-queue-export-promise-handler.cjs.map +1 -1
- package/dist/bounded-queue-export-promise-handler.d.cts +1 -0
- package/dist/bounded-queue-export-promise-handler.mjs +1 -2
- package/dist/bounded-queue-export-promise-handler.mjs.map +1 -1
- package/dist/configuration/compression.cjs +1 -2
- package/dist/configuration/compression.d.cts +1 -4
- package/dist/configuration/compression.d.cts.map +1 -1
- package/dist/configuration/compression.d.mts +1 -4
- package/dist/configuration/compression.d.mts.map +1 -1
- package/dist/configuration/compression.mjs +1 -2
- package/dist/configuration/convert-legacy-http-options.cjs +1 -2
- package/dist/configuration/convert-legacy-http-options.mjs +1 -2
- package/dist/configuration/legacy-base-configuration.d.cts +1 -4
- package/dist/configuration/legacy-base-configuration.d.cts.map +1 -1
- package/dist/configuration/legacy-base-configuration.d.mts +1 -4
- package/dist/configuration/legacy-base-configuration.d.mts.map +1 -1
- package/dist/configuration/otlp-http-configuration.cjs +1 -2
- package/dist/configuration/otlp-http-configuration.d.cts +2 -5
- package/dist/configuration/otlp-http-configuration.d.cts.map +1 -1
- package/dist/configuration/otlp-http-configuration.d.mts +2 -5
- package/dist/configuration/otlp-http-configuration.d.mts.map +1 -1
- package/dist/configuration/otlp-http-configuration.mjs +1 -2
- package/dist/configuration/shared-configuration.cjs +1 -2
- package/dist/configuration/shared-configuration.d.cts +4 -6
- package/dist/configuration/shared-configuration.d.cts.map +1 -1
- package/dist/configuration/shared-configuration.d.mts +3 -6
- package/dist/configuration/shared-configuration.d.mts.map +1 -1
- package/dist/configuration/shared-configuration.mjs +1 -2
- package/dist/configuration/shared-env-configuration.cjs +1 -2
- package/dist/configuration/shared-env-configuration.cjs.map +1 -1
- package/dist/configuration/shared-env-configuration.d.cts +1 -4
- package/dist/configuration/shared-env-configuration.d.cts.map +1 -1
- package/dist/configuration/shared-env-configuration.d.mts +1 -4
- package/dist/configuration/shared-env-configuration.d.mts.map +1 -1
- package/dist/configuration/shared-env-configuration.mjs +1 -2
- package/dist/export-response.d.cts +4 -7
- package/dist/export-response.d.cts.map +1 -1
- package/dist/export-response.d.mts +4 -7
- package/dist/export-response.d.mts.map +1 -1
- package/dist/exporter-transport.d.cts +1 -4
- package/dist/exporter-transport.d.cts.map +1 -1
- package/dist/exporter-transport.d.mts +1 -4
- package/dist/exporter-transport.d.mts.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/is-export-retryable.cjs +1 -2
- package/dist/is-export-retryable.mjs +1 -2
- package/dist/logging-response-handler.cjs +1 -2
- package/dist/logging-response-handler.cjs.map +1 -1
- package/dist/logging-response-handler.mjs +1 -2
- package/dist/otlp-export-delegate.cjs +1 -2
- package/dist/otlp-export-delegate.cjs.map +1 -1
- package/dist/otlp-export-delegate.d.cts +3 -5
- package/dist/otlp-export-delegate.d.cts.map +1 -1
- package/dist/otlp-export-delegate.d.mts +2 -5
- package/dist/otlp-export-delegate.d.mts.map +1 -1
- package/dist/otlp-export-delegate.mjs +1 -2
- package/dist/otlp-export-delegate.mjs.map +1 -1
- package/dist/otlp-network-export-delegate.cjs +1 -2
- package/dist/otlp-network-export-delegate.d.cts +3 -6
- package/dist/otlp-network-export-delegate.d.cts.map +1 -1
- package/dist/otlp-network-export-delegate.d.mts +3 -6
- package/dist/otlp-network-export-delegate.d.mts.map +1 -1
- package/dist/otlp-network-export-delegate.mjs +1 -2
- package/dist/platform/browser/configuration/convert-legacy-browser-http-options.cjs +1 -2
- package/dist/platform/browser/configuration/convert-legacy-browser-http-options.d.cts +1 -4
- package/dist/platform/browser/configuration/convert-legacy-browser-http-options.d.cts.map +1 -1
- package/dist/platform/browser/configuration/convert-legacy-browser-http-options.d.mts +1 -4
- package/dist/platform/browser/configuration/convert-legacy-browser-http-options.d.mts.map +1 -1
- package/dist/platform/browser/configuration/convert-legacy-browser-http-options.mjs +1 -2
- package/dist/platform/browser/configuration/create-legacy-browser-delegate.cjs +3 -4
- package/dist/platform/browser/configuration/create-legacy-browser-delegate.d.cts +3 -6
- package/dist/platform/browser/configuration/create-legacy-browser-delegate.d.cts.map +1 -1
- package/dist/platform/browser/configuration/create-legacy-browser-delegate.d.mts +3 -6
- package/dist/platform/browser/configuration/create-legacy-browser-delegate.d.mts.map +1 -1
- package/dist/platform/browser/configuration/create-legacy-browser-delegate.mjs +3 -4
- package/dist/platform/browser/index.d.cts +3 -0
- package/dist/platform/browser/index.d.mts +3 -0
- package/dist/platform/browser/otlp-browser-http-export-delegate.cjs +2 -3
- package/dist/platform/browser/otlp-browser-http-export-delegate.d.cts +3 -6
- package/dist/platform/browser/otlp-browser-http-export-delegate.d.cts.map +1 -1
- package/dist/platform/browser/otlp-browser-http-export-delegate.d.mts +3 -6
- package/dist/platform/browser/otlp-browser-http-export-delegate.d.mts.map +1 -1
- package/dist/platform/browser/otlp-browser-http-export-delegate.mjs +2 -3
- package/dist/platform/browser/transport/fetch-transport.cjs +1 -2
- package/dist/platform/browser/transport/fetch-transport.cjs.map +1 -1
- package/dist/platform/browser/transport/fetch-transport.mjs +1 -2
- package/dist/platform/browser/transport/fetch-transport.mjs.map +1 -1
- package/dist/platform/node/configuration/convert-legacy-node-http-options.cjs +1 -2
- package/dist/platform/node/configuration/convert-legacy-node-http-options.cjs.map +1 -1
- package/dist/platform/node/configuration/convert-legacy-node-http-options.d.cts +2 -5
- package/dist/platform/node/configuration/convert-legacy-node-http-options.d.cts.map +1 -1
- package/dist/platform/node/configuration/convert-legacy-node-http-options.d.mts +2 -5
- package/dist/platform/node/configuration/convert-legacy-node-http-options.d.mts.map +1 -1
- package/dist/platform/node/configuration/convert-legacy-node-http-options.mjs +1 -2
- package/dist/platform/node/configuration/legacy-node-configuration.d.cts +2 -5
- package/dist/platform/node/configuration/legacy-node-configuration.d.cts.map +1 -1
- package/dist/platform/node/configuration/legacy-node-configuration.d.mts +2 -5
- package/dist/platform/node/configuration/legacy-node-configuration.d.mts.map +1 -1
- package/dist/platform/node/configuration/otlp-node-http-configuration.cjs +28 -4
- package/dist/platform/node/configuration/otlp-node-http-configuration.cjs.map +1 -1
- package/dist/platform/node/configuration/otlp-node-http-configuration.d.cts +3 -6
- package/dist/platform/node/configuration/otlp-node-http-configuration.d.cts.map +1 -1
- package/dist/platform/node/configuration/otlp-node-http-configuration.d.mts +3 -6
- package/dist/platform/node/configuration/otlp-node-http-configuration.d.mts.map +1 -1
- package/dist/platform/node/configuration/otlp-node-http-configuration.mjs +28 -4
- package/dist/platform/node/configuration/otlp-node-http-configuration.mjs.map +1 -1
- package/dist/platform/node/configuration/otlp-node-http-env-configuration.cjs +5 -6
- package/dist/platform/node/configuration/otlp-node-http-env-configuration.cjs.map +1 -1
- package/dist/platform/node/configuration/otlp-node-http-env-configuration.mjs +2 -3
- package/dist/platform/node/index.d.cts +1 -1
- package/dist/platform/node/index.d.mts +1 -1
- package/dist/platform/node/otlp-http-export-delegate.cjs +5 -6
- package/dist/platform/node/otlp-http-export-delegate.d.cts +3 -6
- package/dist/platform/node/otlp-http-export-delegate.d.cts.map +1 -1
- package/dist/platform/node/otlp-http-export-delegate.d.mts +3 -6
- package/dist/platform/node/otlp-http-export-delegate.d.mts.map +1 -1
- package/dist/platform/node/otlp-http-export-delegate.mjs +5 -6
- package/dist/platform/node/transport/http-exporter-transport.cjs +1 -2
- package/dist/platform/node/transport/http-exporter-transport.cjs.map +1 -1
- package/dist/platform/node/transport/http-exporter-transport.mjs +1 -2
- package/dist/platform/node/transport/http-exporter-transport.mjs.map +1 -1
- package/dist/platform/node/transport/http-transport-utils.cjs +2 -3
- package/dist/platform/node/transport/http-transport-utils.mjs +2 -3
- package/dist/retrying-transport.cjs +1 -2
- package/dist/retrying-transport.cjs.map +1 -1
- package/dist/retrying-transport.mjs +1 -2
- package/dist/retrying-transport.mjs.map +1 -1
- package/dist/semconv.cjs +1 -2
- package/dist/semconv.mjs +1 -2
- package/dist/types.cjs +1 -2
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -4
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +1 -4
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +1 -2
- package/dist/types.mjs.map +1 -1
- package/dist/util.cjs +1 -2
- package/dist/util.cjs.map +1 -1
- package/dist/util.mjs +1 -2
- package/dist/version.cjs +2 -3
- package/dist/version.cjs.map +1 -1
- package/dist/version.mjs +2 -3
- package/dist/version.mjs.map +1 -1
- package/package.json +12 -12
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/configuration/shared-configuration.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Configuration shared across all OTLP exporters
|
|
4
3
|
*
|
|
@@ -7,7 +6,7 @@
|
|
|
7
6
|
* - signal-agnostic
|
|
8
7
|
* - transport-agnostic
|
|
9
8
|
*/
|
|
10
|
-
interface OtlpSharedConfiguration {
|
|
9
|
+
export interface OtlpSharedConfiguration {
|
|
11
10
|
timeoutMillis: number;
|
|
12
11
|
concurrencyLimit: number;
|
|
13
12
|
compression: 'gzip' | 'none';
|
|
@@ -17,8 +16,6 @@ interface OtlpSharedConfiguration {
|
|
|
17
16
|
* @param fallbackConfiguration Fallback to use when the {@link userProvidedConfiguration} does not specify an option.
|
|
18
17
|
* @param defaultConfiguration The defaults as defined by the exporter specification
|
|
19
18
|
*/
|
|
20
|
-
declare function mergeOtlpSharedConfigurationWithDefaults(userProvidedConfiguration: Partial<OtlpSharedConfiguration>, fallbackConfiguration: Partial<OtlpSharedConfiguration>, defaultConfiguration: OtlpSharedConfiguration): OtlpSharedConfiguration;
|
|
21
|
-
declare function getSharedConfigurationDefaults(): OtlpSharedConfiguration;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { OtlpSharedConfiguration, getSharedConfigurationDefaults, mergeOtlpSharedConfigurationWithDefaults };
|
|
19
|
+
export declare function mergeOtlpSharedConfigurationWithDefaults(userProvidedConfiguration: Partial<OtlpSharedConfiguration>, fallbackConfiguration: Partial<OtlpSharedConfiguration>, defaultConfiguration: OtlpSharedConfiguration): OtlpSharedConfiguration;
|
|
20
|
+
export declare function getSharedConfigurationDefaults(): OtlpSharedConfiguration;
|
|
24
21
|
//# sourceMappingURL=shared-configuration.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-configuration.d.mts","names":[],"sources":["../../src/configuration/shared-configuration.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared-configuration.d.mts","names":[],"sources":["../../src/configuration/shared-configuration.d.ts"],"mappings":";;;;;;;;iBASiB;EACb;EACA;EACA;;;;;;;wBASoB,yCAAyC,2BAA2B,QAAQ,0BAA0B,uBAAuB,QAAQ,0BAA0B,sBAAsB,0BAA0B;wBAC/M,kCAAkC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/configuration/shared-configuration.ts
|
|
2
2
|
function validateTimeoutMillis(timeoutMillis) {
|
|
3
3
|
if (Number.isFinite(timeoutMillis) && timeoutMillis > 0) return timeoutMillis;
|
|
4
4
|
throw new Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${timeoutMillis}')`);
|
|
@@ -26,7 +26,6 @@ function getSharedConfigurationDefaults() {
|
|
|
26
26
|
compression: "none"
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
//#endregion
|
|
30
29
|
export { getSharedConfigurationDefaults, mergeOtlpSharedConfigurationWithDefaults, validateTimeoutMillis, wrapStaticHeadersInFunction };
|
|
31
30
|
|
|
32
31
|
//# sourceMappingURL=shared-configuration.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
let _opentelemetry_core = require("@opentelemetry/core");
|
|
2
2
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
3
|
-
|
|
3
|
+
// src/configuration/shared-env-configuration.ts
|
|
4
4
|
function parseAndValidateTimeoutFromEnv(timeoutEnvVar) {
|
|
5
5
|
const envTimeout = (0, _opentelemetry_core.getNumberFromEnv)(timeoutEnvVar);
|
|
6
6
|
if (envTimeout != null) {
|
|
@@ -29,7 +29,6 @@ function getSharedConfigurationFromEnvironment(signalIdentifier) {
|
|
|
29
29
|
compression: getCompressionFromEnv(signalIdentifier)
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
//#endregion
|
|
33
32
|
exports.getSharedConfigurationFromEnvironment = getSharedConfigurationFromEnvironment;
|
|
34
33
|
|
|
35
34
|
//# sourceMappingURL=shared-env-configuration.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-env-configuration.cjs","names":["getNumberFromEnv","getStringFromEnv"],"sources":["../../src/configuration/shared-env-configuration.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { getNumberFromEnv, getStringFromEnv } from '@opentelemetry/core';\nimport type { OtlpSharedConfiguration } from './shared-configuration';\nimport { diag } from '@opentelemetry/api';\n\nfunction parseAndValidateTimeoutFromEnv(\n timeoutEnvVar: string\n): number | undefined {\n const envTimeout = getNumberFromEnv(timeoutEnvVar);\n if (envTimeout != null) {\n if (Number.isFinite(envTimeout) && envTimeout > 0) {\n return envTimeout;\n }\n diag.warn(\n `Configuration: ${timeoutEnvVar} is invalid, expected number greater than 0 (actual: ${envTimeout})`\n );\n }\n\n return undefined;\n}\n\nfunction getTimeoutFromEnv(signalIdentifier: string) {\n const specificTimeout = parseAndValidateTimeoutFromEnv(\n `OTEL_EXPORTER_OTLP_${signalIdentifier}_TIMEOUT`\n );\n const nonSpecificTimeout = parseAndValidateTimeoutFromEnv(\n 'OTEL_EXPORTER_OTLP_TIMEOUT'\n );\n\n return specificTimeout ?? nonSpecificTimeout;\n}\n\nfunction parseAndValidateCompressionFromEnv(\n compressionEnvVar: string\n): 'none' | 'gzip' | undefined {\n const compression = getStringFromEnv(compressionEnvVar)?.trim();\n\n if (compression == null || compression === 'none' || compression === 'gzip') {\n return compression;\n }\n\n diag.warn(\n `Configuration: ${compressionEnvVar} is invalid, expected 'none' or 'gzip' (actual: '${compression}')`\n );\n return undefined;\n}\n\nfunction getCompressionFromEnv(\n signalIdentifier: string\n): 'none' | 'gzip' | undefined {\n const specificCompression = parseAndValidateCompressionFromEnv(\n `OTEL_EXPORTER_OTLP_${signalIdentifier}_COMPRESSION`\n );\n const nonSpecificCompression = parseAndValidateCompressionFromEnv(\n 'OTEL_EXPORTER_OTLP_COMPRESSION'\n );\n\n return specificCompression ?? nonSpecificCompression;\n}\n\nexport function getSharedConfigurationFromEnvironment(\n signalIdentifier: string\n): Partial<OtlpSharedConfiguration> {\n return {\n timeoutMillis: getTimeoutFromEnv(signalIdentifier),\n compression: getCompressionFromEnv(signalIdentifier),\n };\n}\n"],"mappings":";;;AAQA,SAAS,+BACP,eACoB;CACpB,MAAM,cAAA,GAAaA,oBAAAA,iBAAAA,CAAiB,aAAa;CACjD,IAAI,cAAc,MAAM;EACtB,IAAI,OAAO,SAAS,UAAU,KAAK,aAAa,GAC9C,OAAO;
|
|
1
|
+
{"version":3,"file":"shared-env-configuration.cjs","names":["getNumberFromEnv","diag","getStringFromEnv"],"sources":["../../src/configuration/shared-env-configuration.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { getNumberFromEnv, getStringFromEnv } from '@opentelemetry/core';\nimport type { OtlpSharedConfiguration } from './shared-configuration';\nimport { diag } from '@opentelemetry/api';\n\nfunction parseAndValidateTimeoutFromEnv(\n timeoutEnvVar: string\n): number | undefined {\n const envTimeout = getNumberFromEnv(timeoutEnvVar);\n if (envTimeout != null) {\n if (Number.isFinite(envTimeout) && envTimeout > 0) {\n return envTimeout;\n }\n diag.warn(\n `Configuration: ${timeoutEnvVar} is invalid, expected number greater than 0 (actual: ${envTimeout})`\n );\n }\n\n return undefined;\n}\n\nfunction getTimeoutFromEnv(signalIdentifier: string) {\n const specificTimeout = parseAndValidateTimeoutFromEnv(\n `OTEL_EXPORTER_OTLP_${signalIdentifier}_TIMEOUT`\n );\n const nonSpecificTimeout = parseAndValidateTimeoutFromEnv(\n 'OTEL_EXPORTER_OTLP_TIMEOUT'\n );\n\n return specificTimeout ?? nonSpecificTimeout;\n}\n\nfunction parseAndValidateCompressionFromEnv(\n compressionEnvVar: string\n): 'none' | 'gzip' | undefined {\n const compression = getStringFromEnv(compressionEnvVar)?.trim();\n\n if (compression == null || compression === 'none' || compression === 'gzip') {\n return compression;\n }\n\n diag.warn(\n `Configuration: ${compressionEnvVar} is invalid, expected 'none' or 'gzip' (actual: '${compression}')`\n );\n return undefined;\n}\n\nfunction getCompressionFromEnv(\n signalIdentifier: string\n): 'none' | 'gzip' | undefined {\n const specificCompression = parseAndValidateCompressionFromEnv(\n `OTEL_EXPORTER_OTLP_${signalIdentifier}_COMPRESSION`\n );\n const nonSpecificCompression = parseAndValidateCompressionFromEnv(\n 'OTEL_EXPORTER_OTLP_COMPRESSION'\n );\n\n return specificCompression ?? nonSpecificCompression;\n}\n\nexport function getSharedConfigurationFromEnvironment(\n signalIdentifier: string\n): Partial<OtlpSharedConfiguration> {\n return {\n timeoutMillis: getTimeoutFromEnv(signalIdentifier),\n compression: getCompressionFromEnv(signalIdentifier),\n };\n}\n"],"mappings":";;;AAQA,SAAS,+BACP,eACoB;CACpB,MAAM,cAAA,GAAaA,oBAAAA,iBAAAA,CAAiB,aAAa;CACjD,IAAI,cAAc,MAAM;EACtB,IAAI,OAAO,SAAS,UAAU,KAAK,aAAa,GAC9C,OAAO;EAETC,mBAAAA,KAAK,KACH,kBAAkB,cAAc,uDAAuD,WAAW,EACpG;CACF;AAGF;AAEA,SAAS,kBAAkB,kBAA0B;CACnD,MAAM,kBAAkB,+BACtB,sBAAsB,iBAAiB,SACzC;CACA,MAAM,qBAAqB,+BACzB,4BACF;CAEA,OAAO,mBAAmB;AAC5B;AAEA,SAAS,mCACP,mBAC6B;CAC7B,MAAM,eAAA,GAAcC,oBAAAA,iBAAAA,CAAiB,iBAAiB,CAAC,EAAE,KAAK;CAE9D,IAAI,eAAe,QAAQ,gBAAgB,UAAU,gBAAgB,QACnE,OAAO;CAGTD,mBAAAA,KAAK,KACH,kBAAkB,kBAAkB,mDAAmD,YAAY,GACrG;AAEF;AAEA,SAAS,sBACP,kBAC6B;CAC7B,MAAM,sBAAsB,mCAC1B,sBAAsB,iBAAiB,aACzC;CACA,MAAM,yBAAyB,mCAC7B,gCACF;CAEA,OAAO,uBAAuB;AAChC;AAEA,SAAgB,sCACd,kBACkC;CAClC,OAAO;EACL,eAAe,kBAAkB,gBAAgB;EACjD,aAAa,sBAAsB,gBAAgB;CACrD;AACF"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import { OtlpSharedConfiguration } from "./shared-configuration.cjs";
|
|
2
|
-
|
|
3
|
-
declare function getSharedConfigurationFromEnvironment(signalIdentifier: string): Partial<OtlpSharedConfiguration>;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { getSharedConfigurationFromEnvironment };
|
|
2
|
+
export declare function getSharedConfigurationFromEnvironment(signalIdentifier: string): Partial<OtlpSharedConfiguration>;
|
|
6
3
|
//# sourceMappingURL=shared-env-configuration.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-env-configuration.d.cts","names":[],"sources":["../../src/configuration/shared-env-configuration.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared-env-configuration.d.cts","names":[],"sources":["../../src/configuration/shared-env-configuration.d.ts"],"mappings":";wBACwB,sCAAsC,2BAA2B,QAAQ"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import { OtlpSharedConfiguration } from "./shared-configuration.mjs";
|
|
2
|
-
|
|
3
|
-
declare function getSharedConfigurationFromEnvironment(signalIdentifier: string): Partial<OtlpSharedConfiguration>;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { getSharedConfigurationFromEnvironment };
|
|
2
|
+
export declare function getSharedConfigurationFromEnvironment(signalIdentifier: string): Partial<OtlpSharedConfiguration>;
|
|
6
3
|
//# sourceMappingURL=shared-env-configuration.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-env-configuration.d.mts","names":[],"sources":["../../src/configuration/shared-env-configuration.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared-env-configuration.d.mts","names":[],"sources":["../../src/configuration/shared-env-configuration.d.ts"],"mappings":";wBACwB,sCAAsC,2BAA2B,QAAQ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getNumberFromEnv, getStringFromEnv } from "@opentelemetry/core";
|
|
2
2
|
import { diag } from "@opentelemetry/api";
|
|
3
|
-
|
|
3
|
+
// src/configuration/shared-env-configuration.ts
|
|
4
4
|
function parseAndValidateTimeoutFromEnv(timeoutEnvVar) {
|
|
5
5
|
const envTimeout = getNumberFromEnv(timeoutEnvVar);
|
|
6
6
|
if (envTimeout != null) {
|
|
@@ -29,7 +29,6 @@ function getSharedConfigurationFromEnvironment(signalIdentifier) {
|
|
|
29
29
|
compression: getCompressionFromEnv(signalIdentifier)
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
//#endregion
|
|
33
32
|
export { getSharedConfigurationFromEnvironment };
|
|
34
33
|
|
|
35
34
|
//# sourceMappingURL=shared-env-configuration.mjs.map
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
interface ExportResponseSuccess {
|
|
1
|
+
export interface ExportResponseSuccess {
|
|
3
2
|
status: 'success';
|
|
4
3
|
data?: Uint8Array;
|
|
5
4
|
}
|
|
6
|
-
interface ExportResponseFailure {
|
|
5
|
+
export interface ExportResponseFailure {
|
|
7
6
|
status: 'failure';
|
|
8
7
|
error: Error;
|
|
9
8
|
}
|
|
10
|
-
interface ExportResponseRetryable {
|
|
9
|
+
export interface ExportResponseRetryable {
|
|
11
10
|
status: 'retryable';
|
|
12
11
|
retryInMillis?: number;
|
|
13
12
|
error?: Error;
|
|
14
13
|
}
|
|
15
|
-
type ExportResponse = ExportResponseSuccess | ExportResponseFailure | ExportResponseRetryable;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { ExportResponse, ExportResponseFailure, ExportResponseRetryable, ExportResponseSuccess };
|
|
14
|
+
export type ExportResponse = ExportResponseSuccess | ExportResponseFailure | ExportResponseRetryable;
|
|
18
15
|
//# sourceMappingURL=export-response.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-response.d.cts","names":[],"sources":["../src/export-response.d.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"export-response.d.cts","names":[],"sources":["../src/export-response.d.ts"],"mappings":"A,iBAAiB;EACb;EACA,OAAO;;iBAEM;EACb;EACA,OAAO;;iBAEM;EACb;EACA;EACA,QAAQ;;YAEA,iBAAiB,wBAAwB,wBAAwB"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
interface ExportResponseSuccess {
|
|
1
|
+
export interface ExportResponseSuccess {
|
|
3
2
|
status: 'success';
|
|
4
3
|
data?: Uint8Array;
|
|
5
4
|
}
|
|
6
|
-
interface ExportResponseFailure {
|
|
5
|
+
export interface ExportResponseFailure {
|
|
7
6
|
status: 'failure';
|
|
8
7
|
error: Error;
|
|
9
8
|
}
|
|
10
|
-
interface ExportResponseRetryable {
|
|
9
|
+
export interface ExportResponseRetryable {
|
|
11
10
|
status: 'retryable';
|
|
12
11
|
retryInMillis?: number;
|
|
13
12
|
error?: Error;
|
|
14
13
|
}
|
|
15
|
-
type ExportResponse = ExportResponseSuccess | ExportResponseFailure | ExportResponseRetryable;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { ExportResponse, ExportResponseFailure, ExportResponseRetryable, ExportResponseSuccess };
|
|
14
|
+
export type ExportResponse = ExportResponseSuccess | ExportResponseFailure | ExportResponseRetryable;
|
|
18
15
|
//# sourceMappingURL=export-response.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-response.d.mts","names":[],"sources":["../src/export-response.d.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"export-response.d.mts","names":[],"sources":["../src/export-response.d.ts"],"mappings":"A,iBAAiB;EACb;EACA,OAAO;;iBAEM;EACb;EACA,OAAO;;iBAEM;EACb;EACA;EACA,QAAQ;;YAEA,iBAAiB,wBAAwB,wBAAwB"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { ExportResponse } from "./export-response.cjs";
|
|
2
|
-
|
|
3
|
-
interface IExporterTransport {
|
|
2
|
+
export interface IExporterTransport {
|
|
4
3
|
send(data: Uint8Array, timeoutMillis: number): Promise<ExportResponse>;
|
|
5
4
|
shutdown(): void;
|
|
6
5
|
}
|
|
7
|
-
//#endregion
|
|
8
|
-
export { IExporterTransport };
|
|
9
6
|
//# sourceMappingURL=exporter-transport.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exporter-transport.d.cts","names":[],"sources":["../src/exporter-transport.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"exporter-transport.d.cts","names":[],"sources":["../src/exporter-transport.d.ts"],"mappings":";iBACiB;EACb,KAAK,MAAM,YAAY,wBAAwB,QAAQ;EACvD"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { ExportResponse } from "./export-response.mjs";
|
|
2
|
-
|
|
3
|
-
interface IExporterTransport {
|
|
2
|
+
export interface IExporterTransport {
|
|
4
3
|
send(data: Uint8Array, timeoutMillis: number): Promise<ExportResponse>;
|
|
5
4
|
shutdown(): void;
|
|
6
5
|
}
|
|
7
|
-
//#endregion
|
|
8
|
-
export { IExporterTransport };
|
|
9
6
|
//# sourceMappingURL=exporter-transport.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exporter-transport.d.mts","names":[],"sources":["../src/exporter-transport.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"exporter-transport.d.mts","names":[],"sources":["../src/exporter-transport.d.ts"],"mappings":";iBACiB;EACb,KAAK,MAAM,YAAY,wBAAwB,QAAQ;EACvD"}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ExportResponse, ExportResponseFailure, ExportResponseRetryable, ExportResponseSuccess } from "./export-response.cjs";
|
|
2
|
-
import { IExporterTransport } from "./exporter-transport.cjs";
|
|
3
|
-
import { ExporterMetrics } from "./ExporterMetrics.cjs";
|
|
4
|
-
import { IOtlpExportDelegate } from "./otlp-export-delegate.cjs";
|
|
5
1
|
import { OTLPExporterBase } from "./OTLPExporterBase.cjs";
|
|
6
2
|
import { OTLPExporterError } from "./types.cjs";
|
|
3
|
+
import { ExportResponse, ExportResponseFailure, ExportResponseRetryable, ExportResponseSuccess } from "./export-response.cjs";
|
|
4
|
+
import { IExporterTransport } from "./exporter-transport.cjs";
|
|
7
5
|
import { OtlpSharedConfiguration, getSharedConfigurationDefaults, mergeOtlpSharedConfigurationWithDefaults } from "./configuration/shared-configuration.cjs";
|
|
8
6
|
import { CompressionAlgorithm } from "./configuration/compression.cjs";
|
|
9
7
|
import { OTLPExporterConfigBase } from "./configuration/legacy-base-configuration.cjs";
|
|
8
|
+
import { IOtlpExportDelegate } from "./otlp-export-delegate.cjs";
|
|
10
9
|
import { createOtlpNetworkExportDelegate } from "./otlp-network-export-delegate.cjs";
|
|
10
|
+
import { ExporterMetrics } from "./ExporterMetrics.cjs";
|
|
11
11
|
export { CompressionAlgorithm, type ExportResponse, type ExportResponseFailure, type ExportResponseRetryable, type ExportResponseSuccess, ExporterMetrics, type IExporterTransport, type IOtlpExportDelegate, OTLPExporterBase, type OTLPExporterConfigBase, OTLPExporterError, type OtlpSharedConfiguration, createOtlpNetworkExportDelegate, getSharedConfigurationDefaults, mergeOtlpSharedConfigurationWithDefaults };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ExportResponse, ExportResponseFailure, ExportResponseRetryable, ExportResponseSuccess } from "./export-response.mjs";
|
|
2
|
-
import { IExporterTransport } from "./exporter-transport.mjs";
|
|
3
|
-
import { ExporterMetrics } from "./ExporterMetrics.mjs";
|
|
4
|
-
import { IOtlpExportDelegate } from "./otlp-export-delegate.mjs";
|
|
5
1
|
import { OTLPExporterBase } from "./OTLPExporterBase.mjs";
|
|
6
2
|
import { OTLPExporterError } from "./types.mjs";
|
|
3
|
+
import { ExportResponse, ExportResponseFailure, ExportResponseRetryable, ExportResponseSuccess } from "./export-response.mjs";
|
|
4
|
+
import { IExporterTransport } from "./exporter-transport.mjs";
|
|
7
5
|
import { OtlpSharedConfiguration, getSharedConfigurationDefaults, mergeOtlpSharedConfigurationWithDefaults } from "./configuration/shared-configuration.mjs";
|
|
8
6
|
import { CompressionAlgorithm } from "./configuration/compression.mjs";
|
|
9
7
|
import { OTLPExporterConfigBase } from "./configuration/legacy-base-configuration.mjs";
|
|
8
|
+
import { IOtlpExportDelegate } from "./otlp-export-delegate.mjs";
|
|
10
9
|
import { createOtlpNetworkExportDelegate } from "./otlp-network-export-delegate.mjs";
|
|
10
|
+
import { ExporterMetrics } from "./ExporterMetrics.mjs";
|
|
11
11
|
export { CompressionAlgorithm, type ExportResponse, type ExportResponseFailure, type ExportResponseRetryable, type ExportResponseSuccess, ExporterMetrics, type IExporterTransport, type IOtlpExportDelegate, OTLPExporterBase, type OTLPExporterConfigBase, OTLPExporterError, type OtlpSharedConfiguration, createOtlpNetworkExportDelegate, getSharedConfigurationDefaults, mergeOtlpSharedConfigurationWithDefaults };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/is-export-retryable.ts
|
|
2
2
|
function isExportHTTPErrorRetryable(statusCode) {
|
|
3
3
|
return statusCode === 429 || statusCode === 502 || statusCode === 503 || statusCode === 504;
|
|
4
4
|
}
|
|
@@ -10,7 +10,6 @@ function parseRetryAfterToMills(retryAfter) {
|
|
|
10
10
|
if (delay >= 0) return delay;
|
|
11
11
|
return 0;
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
exports.isExportHTTPErrorRetryable = isExportHTTPErrorRetryable;
|
|
15
14
|
exports.parseRetryAfterToMills = parseRetryAfterToMills;
|
|
16
15
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/is-export-retryable.ts
|
|
2
2
|
function isExportHTTPErrorRetryable(statusCode) {
|
|
3
3
|
return statusCode === 429 || statusCode === 502 || statusCode === 503 || statusCode === 504;
|
|
4
4
|
}
|
|
@@ -10,7 +10,6 @@ function parseRetryAfterToMills(retryAfter) {
|
|
|
10
10
|
if (delay >= 0) return delay;
|
|
11
11
|
return 0;
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { isExportHTTPErrorRetryable, parseRetryAfterToMills };
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=is-export-retryable.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
2
|
-
|
|
2
|
+
// src/logging-response-handler.ts
|
|
3
3
|
function isPartialSuccessResponse(response) {
|
|
4
4
|
return Object.prototype.hasOwnProperty.call(response, "partialSuccess");
|
|
5
5
|
}
|
|
@@ -12,7 +12,6 @@ function createLoggingPartialSuccessResponseHandler() {
|
|
|
12
12
|
_opentelemetry_api.diag.warn("Received Partial Success response:", JSON.stringify(response.partialSuccess));
|
|
13
13
|
} };
|
|
14
14
|
}
|
|
15
|
-
//#endregion
|
|
16
15
|
exports.createLoggingPartialSuccessResponseHandler = createLoggingPartialSuccessResponseHandler;
|
|
17
16
|
|
|
18
17
|
//# sourceMappingURL=logging-response-handler.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging-response-handler.cjs","names":[],"sources":["../src/logging-response-handler.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { diag } from '@opentelemetry/api';\nimport type { IOtlpResponseHandler } from './response-handler';\n\nfunction isPartialSuccessResponse(\n response: unknown\n): response is { partialSuccess: never } {\n return Object.prototype.hasOwnProperty.call(response, 'partialSuccess');\n}\n\n/**\n * Default response handler that logs a partial success to the console.\n */\nexport function createLoggingPartialSuccessResponseHandler<\n T,\n>(): IOtlpResponseHandler<T> {\n return {\n handleResponse(response: T) {\n // Partial success MUST never be an empty object according the specification\n // see https://opentelemetry.io/docs/specs/otlp/#partial-success\n if (\n response == null ||\n !isPartialSuccessResponse(response) ||\n response.partialSuccess == null ||\n Object.keys(response.partialSuccess).length === 0\n ) {\n return;\n }\n diag.warn(\n 'Received Partial Success response:',\n JSON.stringify(response.partialSuccess)\n );\n },\n };\n}\n"],"mappings":";;AAOA,SAAS,yBACP,UACuC;CACvC,OAAO,OAAO,UAAU,eAAe,KAAK,UAAU,gBAAgB;AACxE;;;;AAKA,SAAgB,6CAEa;CAC3B,OAAO,EACL,eAAe,UAAa;EAG1B,IACE,YAAY,QACZ,CAAC,yBAAyB,QAAQ,KAClC,SAAS,kBAAkB,QAC3B,OAAO,KAAK,SAAS,cAAc,CAAC,CAAC,WAAW,GAEhD;
|
|
1
|
+
{"version":3,"file":"logging-response-handler.cjs","names":["diag"],"sources":["../src/logging-response-handler.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { diag } from '@opentelemetry/api';\nimport type { IOtlpResponseHandler } from './response-handler';\n\nfunction isPartialSuccessResponse(\n response: unknown\n): response is { partialSuccess: never } {\n return Object.prototype.hasOwnProperty.call(response, 'partialSuccess');\n}\n\n/**\n * Default response handler that logs a partial success to the console.\n */\nexport function createLoggingPartialSuccessResponseHandler<\n T,\n>(): IOtlpResponseHandler<T> {\n return {\n handleResponse(response: T) {\n // Partial success MUST never be an empty object according the specification\n // see https://opentelemetry.io/docs/specs/otlp/#partial-success\n if (\n response == null ||\n !isPartialSuccessResponse(response) ||\n response.partialSuccess == null ||\n Object.keys(response.partialSuccess).length === 0\n ) {\n return;\n }\n diag.warn(\n 'Received Partial Success response:',\n JSON.stringify(response.partialSuccess)\n );\n },\n };\n}\n"],"mappings":";;AAOA,SAAS,yBACP,UACuC;CACvC,OAAO,OAAO,UAAU,eAAe,KAAK,UAAU,gBAAgB;AACxE;;;;AAKA,SAAgB,6CAEa;CAC3B,OAAO,EACL,eAAe,UAAa;EAG1B,IACE,YAAY,QACZ,CAAC,yBAAyB,QAAQ,KAClC,SAAS,kBAAkB,QAC3B,OAAO,KAAK,SAAS,cAAc,CAAC,CAAC,WAAW,GAEhD;EAEFA,mBAAAA,KAAK,KACH,sCACA,KAAK,UAAU,SAAS,cAAc,CACxC;CACF,EACF;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { diag } from "@opentelemetry/api";
|
|
2
|
-
|
|
2
|
+
// src/logging-response-handler.ts
|
|
3
3
|
function isPartialSuccessResponse(response) {
|
|
4
4
|
return Object.prototype.hasOwnProperty.call(response, "partialSuccess");
|
|
5
5
|
}
|
|
@@ -12,7 +12,6 @@ function createLoggingPartialSuccessResponseHandler() {
|
|
|
12
12
|
diag.warn("Received Partial Success response:", JSON.stringify(response.partialSuccess));
|
|
13
13
|
} };
|
|
14
14
|
}
|
|
15
|
-
//#endregion
|
|
16
15
|
export { createLoggingPartialSuccessResponseHandler };
|
|
17
16
|
|
|
18
17
|
//# sourceMappingURL=logging-response-handler.mjs.map
|
|
@@ -2,7 +2,7 @@ const require_types = require("./types.cjs");
|
|
|
2
2
|
const require_logging_response_handler = require("./logging-response-handler.cjs");
|
|
3
3
|
let _opentelemetry_core = require("@opentelemetry/core");
|
|
4
4
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
5
|
-
|
|
5
|
+
// src/otlp-export-delegate.ts
|
|
6
6
|
var OTLPExportDelegate = class {
|
|
7
7
|
_metrics;
|
|
8
8
|
_diagLogger;
|
|
@@ -95,7 +95,6 @@ var OTLPExportDelegate = class {
|
|
|
95
95
|
function createOtlpExportDelegate(components, settings) {
|
|
96
96
|
return new OTLPExportDelegate(components.transport, components.serializer, require_logging_response_handler.createLoggingPartialSuccessResponseHandler(), components.promiseHandler, components.metrics, settings.timeout);
|
|
97
97
|
}
|
|
98
|
-
//#endregion
|
|
99
98
|
exports.createOtlpExportDelegate = createOtlpExportDelegate;
|
|
100
99
|
|
|
101
100
|
//# sourceMappingURL=otlp-export-delegate.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otlp-export-delegate.cjs","names":["diag","ExportResultCode","OTLPExporterError","createLoggingPartialSuccessResponseHandler"],"sources":["../src/otlp-export-delegate.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { ExportResult } from '@opentelemetry/core';\nimport { ExportResultCode } from '@opentelemetry/core';\nimport type { IExporterTransport } from './exporter-transport';\nimport type { IExportPromiseHandler } from './bounded-queue-export-promise-handler';\nimport type { ISerializer } from '@opentelemetry/otlp-transformer';\nimport { OTLPExporterError } from './types';\nimport type { IOtlpResponseHandler } from './response-handler';\nimport { createLoggingPartialSuccessResponseHandler } from './logging-response-handler';\nimport type { DiagLogger } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport { type ExporterMetrics } from './ExporterMetrics';\n\n/**\n * Internally shared export logic for OTLP.\n */\nexport interface IOtlpExportDelegate<Internal> {\n export(\n internalRepresentation: Internal,\n resultCallback: (result: ExportResult) => void\n ): void;\n forceFlush(): Promise<void>;\n shutdown(): Promise<void>;\n setMetrics(metrics: ExporterMetrics<Internal>): void;\n}\n\nclass OTLPExportDelegate
|
|
1
|
+
{"version":3,"file":"otlp-export-delegate.cjs","names":["diag","ExportResultCode","OTLPExporterError","createLoggingPartialSuccessResponseHandler"],"sources":["../src/otlp-export-delegate.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { ExportResult } from '@opentelemetry/core';\nimport { ExportResultCode } from '@opentelemetry/core';\nimport type { IExporterTransport } from './exporter-transport';\nimport type { IExportPromiseHandler } from './bounded-queue-export-promise-handler';\nimport type { ISerializer } from '@opentelemetry/otlp-transformer';\nimport { OTLPExporterError } from './types';\nimport type { IOtlpResponseHandler } from './response-handler';\nimport { createLoggingPartialSuccessResponseHandler } from './logging-response-handler';\nimport type { DiagLogger } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport { type ExporterMetrics } from './ExporterMetrics';\n\n/**\n * Internally shared export logic for OTLP.\n */\nexport interface IOtlpExportDelegate<Internal> {\n export(\n internalRepresentation: Internal,\n resultCallback: (result: ExportResult) => void\n ): void;\n forceFlush(): Promise<void>;\n shutdown(): Promise<void>;\n setMetrics(metrics: ExporterMetrics<Internal>): void;\n}\n\nclass OTLPExportDelegate<\n Internal,\n Response,\n> implements IOtlpExportDelegate<Internal> {\n private _metrics: ExporterMetrics<Internal>;\n private _diagLogger: DiagLogger;\n private _transport: IExporterTransport;\n private _serializer: ISerializer<Internal, Response>;\n private _responseHandler: IOtlpResponseHandler<Response>;\n private _promiseQueue: IExportPromiseHandler;\n private _timeout: number;\n\n constructor(\n transport: IExporterTransport,\n serializer: ISerializer<Internal, Response>,\n responseHandler: IOtlpResponseHandler<Response>,\n promiseQueue: IExportPromiseHandler,\n metrics: ExporterMetrics<Internal>,\n timeout: number\n ) {\n this._transport = transport;\n this._serializer = serializer;\n this._responseHandler = responseHandler;\n this._promiseQueue = promiseQueue;\n this._timeout = timeout;\n this._diagLogger = diag.createComponentLogger({\n namespace: 'OTLPExportDelegate',\n });\n this._metrics = metrics;\n }\n\n export(\n internalRepresentation: Internal,\n resultCallback: (result: ExportResult) => void\n ): void {\n this._diagLogger.debug('items to be sent', internalRepresentation);\n\n // don't do any work if too many exports are in progress.\n if (this._promiseQueue.hasReachedLimit()) {\n resultCallback({\n code: ExportResultCode.FAILED,\n error: new Error('Concurrent export limit reached'),\n });\n return;\n }\n\n const serializedRequest = this._serializer.serializeRequest(\n internalRepresentation\n );\n\n if (serializedRequest == null) {\n resultCallback({\n code: ExportResultCode.FAILED,\n error: new Error('Nothing to send'),\n });\n return;\n }\n\n const finishExport = this._metrics.startExport(internalRepresentation);\n this._promiseQueue.pushPromise(\n this._transport.send(serializedRequest, this._timeout).then(\n response => {\n if (response.status === 'success') {\n finishExport(undefined);\n if (response.data != null) {\n try {\n this._responseHandler.handleResponse(\n this._serializer.deserializeResponse(response.data)\n );\n } catch (e) {\n this._diagLogger.warn(\n 'Export succeeded but could not deserialize response - is the response specification compliant?',\n e,\n response.data\n );\n }\n }\n // No matter the response, we can consider the export still successful.\n resultCallback({\n code: ExportResultCode.SUCCESS,\n });\n return;\n } else if (response.status === 'failure' && response.error) {\n finishExport(response.error);\n resultCallback({\n code: ExportResultCode.FAILED,\n error: response.error,\n });\n return;\n } else if (response.status === 'retryable') {\n finishExport('export_max_retries');\n resultCallback({\n code: ExportResultCode.FAILED,\n error:\n response.error ??\n new OTLPExporterError('Export failed with retryable status'),\n });\n } else {\n finishExport('export_failed');\n resultCallback({\n code: ExportResultCode.FAILED,\n error: new OTLPExporterError('Export failed with unknown error'),\n });\n }\n },\n reason => {\n finishExport(reason);\n resultCallback({\n code: ExportResultCode.FAILED,\n error: reason,\n });\n }\n )\n );\n }\n\n forceFlush(): Promise<void> {\n return this._promiseQueue.awaitAll();\n }\n\n setMetrics(metrics: ExporterMetrics<Internal>) {\n this._metrics = metrics;\n }\n\n async shutdown(): Promise<void> {\n this._diagLogger.debug('shutdown started');\n await this.forceFlush();\n this._transport.shutdown();\n }\n}\n\n/**\n * Creates a generic delegate for OTLP exports which only contains parts of the OTLP export that are shared across all\n * signals.\n */\nexport function createOtlpExportDelegate<Internal, Response>(\n components: {\n transport: IExporterTransport;\n serializer: ISerializer<Internal, Response>;\n promiseHandler: IExportPromiseHandler;\n metrics: ExporterMetrics<Internal>;\n },\n settings: { timeout: number }\n): IOtlpExportDelegate<Internal> {\n return new OTLPExportDelegate(\n components.transport,\n components.serializer,\n createLoggingPartialSuccessResponseHandler(),\n components.promiseHandler,\n components.metrics,\n settings.timeout\n );\n}\n"],"mappings":";;;;;AA8BA,IAAM,qBAAN,MAG2C;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CAER,YACE,WACA,YACA,iBACA,cACA,SACA,SACA;EACA,KAAK,aAAa;EAClB,KAAK,cAAc;EACnB,KAAK,mBAAmB;EACxB,KAAK,gBAAgB;EACrB,KAAK,WAAW;EAChB,KAAK,cAAcA,mBAAAA,KAAK,sBAAsB,EAC5C,WAAW,qBACb,CAAC;EACD,KAAK,WAAW;CAClB;CAEA,OACE,wBACA,gBACM;EACN,KAAK,YAAY,MAAM,oBAAoB,sBAAsB;EAGjE,IAAI,KAAK,cAAc,gBAAgB,GAAG;GACxC,eAAe;IACb,MAAMC,oBAAAA,iBAAiB;IACvB,uBAAO,IAAI,MAAM,iCAAiC;GACpD,CAAC;GACD;EACF;EAEA,MAAM,oBAAoB,KAAK,YAAY,iBACzC,sBACF;EAEA,IAAI,qBAAqB,MAAM;GAC7B,eAAe;IACb,MAAMA,oBAAAA,iBAAiB;IACvB,uBAAO,IAAI,MAAM,iBAAiB;GACpC,CAAC;GACD;EACF;EAEA,MAAM,eAAe,KAAK,SAAS,YAAY,sBAAsB;EACrE,KAAK,cAAc,YACjB,KAAK,WAAW,KAAK,mBAAmB,KAAK,QAAQ,CAAC,CAAC,MACrD,aAAY;GACV,IAAI,SAAS,WAAW,WAAW;IACjC,aAAa,KAAA,CAAS;IACtB,IAAI,SAAS,QAAQ,MACnB,IAAI;KACF,KAAK,iBAAiB,eACpB,KAAK,YAAY,oBAAoB,SAAS,IAAI,CACpD;IACF,SAAS,GAAG;KACV,KAAK,YAAY,KACf,kGACA,GACA,SAAS,IACX;IACF;IAGF,eAAe,EACb,MAAMA,oBAAAA,iBAAiB,QACzB,CAAC;IACD;GACF,OAAO,IAAI,SAAS,WAAW,aAAa,SAAS,OAAO;IAC1D,aAAa,SAAS,KAAK;IAC3B,eAAe;KACb,MAAMA,oBAAAA,iBAAiB;KACvB,OAAO,SAAS;IAClB,CAAC;IACD;GACF,OAAO,IAAI,SAAS,WAAW,aAAa;IAC1C,aAAa,oBAAoB;IACjC,eAAe;KACb,MAAMA,oBAAAA,iBAAiB;KACvB,OACE,SAAS,SACT,IAAIC,cAAAA,kBAAkB,qCAAqC;IAC/D,CAAC;GACH,OAAO;IACL,aAAa,eAAe;IAC5B,eAAe;KACb,MAAMD,oBAAAA,iBAAiB;KACvB,OAAO,IAAIC,cAAAA,kBAAkB,kCAAkC;IACjE,CAAC;GACH;EACF,IACA,WAAU;GACR,aAAa,MAAM;GACnB,eAAe;IACb,MAAMD,oBAAAA,iBAAiB;IACvB,OAAO;GACT,CAAC;EACH,CACF,CACF;CACF;CAEA,aAA4B;EAC1B,OAAO,KAAK,cAAc,SAAS;CACrC;CAEA,WAAW,SAAoC;EAC7C,KAAK,WAAW;CAClB;CAEA,MAAM,WAA0B;EAC9B,KAAK,YAAY,MAAM,kBAAkB;EACzC,MAAM,KAAK,WAAW;EACtB,KAAK,WAAW,SAAS;CAC3B;AACF;;;;;AAMA,SAAgB,yBACd,YAMA,UAC+B;CAC/B,OAAO,IAAI,mBACT,WAAW,WACX,WAAW,YACXE,iCAAAA,2CAA2C,GAC3C,WAAW,gBACX,WAAW,SACX,SAAS,OACX;AACF"}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
+
import "./exporter-transport.cjs";
|
|
2
|
+
import "./bounded-queue-export-promise-handler.cjs";
|
|
1
3
|
import { ExporterMetrics } from "./ExporterMetrics.cjs";
|
|
2
4
|
import { ExportResult } from "@opentelemetry/core";
|
|
3
|
-
import { ISerializer } from "@opentelemetry/otlp-transformer";
|
|
4
|
-
//#region src/otlp-export-delegate.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Internally shared export logic for OTLP.
|
|
7
7
|
*/
|
|
8
|
-
interface IOtlpExportDelegate<Internal> {
|
|
8
|
+
export interface IOtlpExportDelegate<Internal> {
|
|
9
9
|
export(internalRepresentation: Internal, resultCallback: (result: ExportResult) => void): void;
|
|
10
10
|
forceFlush(): Promise<void>;
|
|
11
11
|
shutdown(): Promise<void>;
|
|
12
12
|
setMetrics(metrics: ExporterMetrics<Internal>): void;
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { IOtlpExportDelegate };
|
|
16
14
|
//# sourceMappingURL=otlp-export-delegate.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otlp-export-delegate.d.cts","names":[],"sources":["../src/otlp-export-delegate.d.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"otlp-export-delegate.d.cts","names":[],"sources":["../src/otlp-export-delegate.d.ts"],"mappings":";;;;;;;iBAQiB,oBAAoB;EACjC,OAAO,wBAAwB,UAAU,iBAAiB,QAAQ;EAClE,cAAc;EACd,YAAY;EACZ,WAAW,SAAS,gBAAgB"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { ExporterMetrics } from "./ExporterMetrics.mjs";
|
|
2
2
|
import { ExportResult } from "@opentelemetry/core";
|
|
3
|
-
import
|
|
4
|
-
//#region src/otlp-export-delegate.d.ts
|
|
3
|
+
import "@opentelemetry/otlp-transformer";
|
|
5
4
|
/**
|
|
6
5
|
* Internally shared export logic for OTLP.
|
|
7
6
|
*/
|
|
8
|
-
interface IOtlpExportDelegate<Internal> {
|
|
7
|
+
export interface IOtlpExportDelegate<Internal> {
|
|
9
8
|
export(internalRepresentation: Internal, resultCallback: (result: ExportResult) => void): void;
|
|
10
9
|
forceFlush(): Promise<void>;
|
|
11
10
|
shutdown(): Promise<void>;
|
|
12
11
|
setMetrics(metrics: ExporterMetrics<Internal>): void;
|
|
13
12
|
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { IOtlpExportDelegate };
|
|
16
13
|
//# sourceMappingURL=otlp-export-delegate.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otlp-export-delegate.d.mts","names":[],"sources":["../src/otlp-export-delegate.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"otlp-export-delegate.d.mts","names":[],"sources":["../src/otlp-export-delegate.d.ts"],"mappings":";;;;;;iBAQiB,oBAAoB;EACjC,OAAO,wBAAwB,UAAU,iBAAiB,QAAQ;EAClE,cAAc;EACd,YAAY;EACZ,WAAW,SAAS,gBAAgB"}
|
|
@@ -2,7 +2,7 @@ import { OTLPExporterError } from "./types.mjs";
|
|
|
2
2
|
import { createLoggingPartialSuccessResponseHandler } from "./logging-response-handler.mjs";
|
|
3
3
|
import { ExportResultCode } from "@opentelemetry/core";
|
|
4
4
|
import { diag } from "@opentelemetry/api";
|
|
5
|
-
|
|
5
|
+
// src/otlp-export-delegate.ts
|
|
6
6
|
var OTLPExportDelegate = class {
|
|
7
7
|
_metrics;
|
|
8
8
|
_diagLogger;
|
|
@@ -95,7 +95,6 @@ var OTLPExportDelegate = class {
|
|
|
95
95
|
function createOtlpExportDelegate(components, settings) {
|
|
96
96
|
return new OTLPExportDelegate(components.transport, components.serializer, createLoggingPartialSuccessResponseHandler(), components.promiseHandler, components.metrics, settings.timeout);
|
|
97
97
|
}
|
|
98
|
-
//#endregion
|
|
99
98
|
export { createOtlpExportDelegate };
|
|
100
99
|
|
|
101
100
|
//# sourceMappingURL=otlp-export-delegate.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otlp-export-delegate.mjs","names":[],"sources":["../src/otlp-export-delegate.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { ExportResult } from '@opentelemetry/core';\nimport { ExportResultCode } from '@opentelemetry/core';\nimport type { IExporterTransport } from './exporter-transport';\nimport type { IExportPromiseHandler } from './bounded-queue-export-promise-handler';\nimport type { ISerializer } from '@opentelemetry/otlp-transformer';\nimport { OTLPExporterError } from './types';\nimport type { IOtlpResponseHandler } from './response-handler';\nimport { createLoggingPartialSuccessResponseHandler } from './logging-response-handler';\nimport type { DiagLogger } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport { type ExporterMetrics } from './ExporterMetrics';\n\n/**\n * Internally shared export logic for OTLP.\n */\nexport interface IOtlpExportDelegate<Internal> {\n export(\n internalRepresentation: Internal,\n resultCallback: (result: ExportResult) => void\n ): void;\n forceFlush(): Promise<void>;\n shutdown(): Promise<void>;\n setMetrics(metrics: ExporterMetrics<Internal>): void;\n}\n\nclass OTLPExportDelegate
|
|
1
|
+
{"version":3,"file":"otlp-export-delegate.mjs","names":[],"sources":["../src/otlp-export-delegate.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { ExportResult } from '@opentelemetry/core';\nimport { ExportResultCode } from '@opentelemetry/core';\nimport type { IExporterTransport } from './exporter-transport';\nimport type { IExportPromiseHandler } from './bounded-queue-export-promise-handler';\nimport type { ISerializer } from '@opentelemetry/otlp-transformer';\nimport { OTLPExporterError } from './types';\nimport type { IOtlpResponseHandler } from './response-handler';\nimport { createLoggingPartialSuccessResponseHandler } from './logging-response-handler';\nimport type { DiagLogger } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport { type ExporterMetrics } from './ExporterMetrics';\n\n/**\n * Internally shared export logic for OTLP.\n */\nexport interface IOtlpExportDelegate<Internal> {\n export(\n internalRepresentation: Internal,\n resultCallback: (result: ExportResult) => void\n ): void;\n forceFlush(): Promise<void>;\n shutdown(): Promise<void>;\n setMetrics(metrics: ExporterMetrics<Internal>): void;\n}\n\nclass OTLPExportDelegate<\n Internal,\n Response,\n> implements IOtlpExportDelegate<Internal> {\n private _metrics: ExporterMetrics<Internal>;\n private _diagLogger: DiagLogger;\n private _transport: IExporterTransport;\n private _serializer: ISerializer<Internal, Response>;\n private _responseHandler: IOtlpResponseHandler<Response>;\n private _promiseQueue: IExportPromiseHandler;\n private _timeout: number;\n\n constructor(\n transport: IExporterTransport,\n serializer: ISerializer<Internal, Response>,\n responseHandler: IOtlpResponseHandler<Response>,\n promiseQueue: IExportPromiseHandler,\n metrics: ExporterMetrics<Internal>,\n timeout: number\n ) {\n this._transport = transport;\n this._serializer = serializer;\n this._responseHandler = responseHandler;\n this._promiseQueue = promiseQueue;\n this._timeout = timeout;\n this._diagLogger = diag.createComponentLogger({\n namespace: 'OTLPExportDelegate',\n });\n this._metrics = metrics;\n }\n\n export(\n internalRepresentation: Internal,\n resultCallback: (result: ExportResult) => void\n ): void {\n this._diagLogger.debug('items to be sent', internalRepresentation);\n\n // don't do any work if too many exports are in progress.\n if (this._promiseQueue.hasReachedLimit()) {\n resultCallback({\n code: ExportResultCode.FAILED,\n error: new Error('Concurrent export limit reached'),\n });\n return;\n }\n\n const serializedRequest = this._serializer.serializeRequest(\n internalRepresentation\n );\n\n if (serializedRequest == null) {\n resultCallback({\n code: ExportResultCode.FAILED,\n error: new Error('Nothing to send'),\n });\n return;\n }\n\n const finishExport = this._metrics.startExport(internalRepresentation);\n this._promiseQueue.pushPromise(\n this._transport.send(serializedRequest, this._timeout).then(\n response => {\n if (response.status === 'success') {\n finishExport(undefined);\n if (response.data != null) {\n try {\n this._responseHandler.handleResponse(\n this._serializer.deserializeResponse(response.data)\n );\n } catch (e) {\n this._diagLogger.warn(\n 'Export succeeded but could not deserialize response - is the response specification compliant?',\n e,\n response.data\n );\n }\n }\n // No matter the response, we can consider the export still successful.\n resultCallback({\n code: ExportResultCode.SUCCESS,\n });\n return;\n } else if (response.status === 'failure' && response.error) {\n finishExport(response.error);\n resultCallback({\n code: ExportResultCode.FAILED,\n error: response.error,\n });\n return;\n } else if (response.status === 'retryable') {\n finishExport('export_max_retries');\n resultCallback({\n code: ExportResultCode.FAILED,\n error:\n response.error ??\n new OTLPExporterError('Export failed with retryable status'),\n });\n } else {\n finishExport('export_failed');\n resultCallback({\n code: ExportResultCode.FAILED,\n error: new OTLPExporterError('Export failed with unknown error'),\n });\n }\n },\n reason => {\n finishExport(reason);\n resultCallback({\n code: ExportResultCode.FAILED,\n error: reason,\n });\n }\n )\n );\n }\n\n forceFlush(): Promise<void> {\n return this._promiseQueue.awaitAll();\n }\n\n setMetrics(metrics: ExporterMetrics<Internal>) {\n this._metrics = metrics;\n }\n\n async shutdown(): Promise<void> {\n this._diagLogger.debug('shutdown started');\n await this.forceFlush();\n this._transport.shutdown();\n }\n}\n\n/**\n * Creates a generic delegate for OTLP exports which only contains parts of the OTLP export that are shared across all\n * signals.\n */\nexport function createOtlpExportDelegate<Internal, Response>(\n components: {\n transport: IExporterTransport;\n serializer: ISerializer<Internal, Response>;\n promiseHandler: IExportPromiseHandler;\n metrics: ExporterMetrics<Internal>;\n },\n settings: { timeout: number }\n): IOtlpExportDelegate<Internal> {\n return new OTLPExportDelegate(\n components.transport,\n components.serializer,\n createLoggingPartialSuccessResponseHandler(),\n components.promiseHandler,\n components.metrics,\n settings.timeout\n );\n}\n"],"mappings":";;;;;AA8BA,IAAM,qBAAN,MAG2C;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CAER,YACE,WACA,YACA,iBACA,cACA,SACA,SACA;EACA,KAAK,aAAa;EAClB,KAAK,cAAc;EACnB,KAAK,mBAAmB;EACxB,KAAK,gBAAgB;EACrB,KAAK,WAAW;EAChB,KAAK,cAAc,KAAK,sBAAsB,EAC5C,WAAW,qBACb,CAAC;EACD,KAAK,WAAW;CAClB;CAEA,OACE,wBACA,gBACM;EACN,KAAK,YAAY,MAAM,oBAAoB,sBAAsB;EAGjE,IAAI,KAAK,cAAc,gBAAgB,GAAG;GACxC,eAAe;IACb,MAAM,iBAAiB;IACvB,uBAAO,IAAI,MAAM,iCAAiC;GACpD,CAAC;GACD;EACF;EAEA,MAAM,oBAAoB,KAAK,YAAY,iBACzC,sBACF;EAEA,IAAI,qBAAqB,MAAM;GAC7B,eAAe;IACb,MAAM,iBAAiB;IACvB,uBAAO,IAAI,MAAM,iBAAiB;GACpC,CAAC;GACD;EACF;EAEA,MAAM,eAAe,KAAK,SAAS,YAAY,sBAAsB;EACrE,KAAK,cAAc,YACjB,KAAK,WAAW,KAAK,mBAAmB,KAAK,QAAQ,CAAC,CAAC,MACrD,aAAY;GACV,IAAI,SAAS,WAAW,WAAW;IACjC,aAAa,KAAA,CAAS;IACtB,IAAI,SAAS,QAAQ,MACnB,IAAI;KACF,KAAK,iBAAiB,eACpB,KAAK,YAAY,oBAAoB,SAAS,IAAI,CACpD;IACF,SAAS,GAAG;KACV,KAAK,YAAY,KACf,kGACA,GACA,SAAS,IACX;IACF;IAGF,eAAe,EACb,MAAM,iBAAiB,QACzB,CAAC;IACD;GACF,OAAO,IAAI,SAAS,WAAW,aAAa,SAAS,OAAO;IAC1D,aAAa,SAAS,KAAK;IAC3B,eAAe;KACb,MAAM,iBAAiB;KACvB,OAAO,SAAS;IAClB,CAAC;IACD;GACF,OAAO,IAAI,SAAS,WAAW,aAAa;IAC1C,aAAa,oBAAoB;IACjC,eAAe;KACb,MAAM,iBAAiB;KACvB,OACE,SAAS,SACT,IAAI,kBAAkB,qCAAqC;IAC/D,CAAC;GACH,OAAO;IACL,aAAa,eAAe;IAC5B,eAAe;KACb,MAAM,iBAAiB;KACvB,OAAO,IAAI,kBAAkB,kCAAkC;IACjE,CAAC;GACH;EACF,IACA,WAAU;GACR,aAAa,MAAM;GACnB,eAAe;IACb,MAAM,iBAAiB;IACvB,OAAO;GACT,CAAC;EACH,CACF,CACF;CACF;CAEA,aAA4B;EAC1B,OAAO,KAAK,cAAc,SAAS;CACrC;CAEA,WAAW,SAAoC;EAC7C,KAAK,WAAW;CAClB;CAEA,MAAM,WAA0B;EAC9B,KAAK,YAAY,MAAM,kBAAkB;EACzC,MAAM,KAAK,WAAW;EACtB,KAAK,WAAW,SAAS;CAC3B;AACF;;;;;AAMA,SAAgB,yBACd,YAMA,UAC+B;CAC/B,OAAO,IAAI,mBACT,WAAW,WACX,WAAW,YACX,2CAA2C,GAC3C,WAAW,gBACX,WAAW,SACX,SAAS,OACX;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_bounded_queue_export_promise_handler = require("./bounded-queue-export-promise-handler.cjs");
|
|
2
2
|
const require_otlp_export_delegate = require("./otlp-export-delegate.cjs");
|
|
3
|
-
|
|
3
|
+
// src/otlp-network-export-delegate.ts
|
|
4
4
|
function createOtlpNetworkExportDelegate(options, serializer, metrics, transport) {
|
|
5
5
|
return require_otlp_export_delegate.createOtlpExportDelegate({
|
|
6
6
|
transport,
|
|
@@ -9,7 +9,6 @@ function createOtlpNetworkExportDelegate(options, serializer, metrics, transport
|
|
|
9
9
|
metrics
|
|
10
10
|
}, { timeout: options.timeoutMillis });
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
12
|
exports.createOtlpNetworkExportDelegate = createOtlpNetworkExportDelegate;
|
|
14
13
|
|
|
15
14
|
//# sourceMappingURL=otlp-network-export-delegate.cjs.map
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
+
import { OtlpSharedConfiguration } from "./configuration/shared-configuration.cjs";
|
|
1
2
|
import { IExporterTransport } from "./exporter-transport.cjs";
|
|
2
|
-
import { ExporterMetrics } from "./ExporterMetrics.cjs";
|
|
3
3
|
import { IOtlpExportDelegate } from "./otlp-export-delegate.cjs";
|
|
4
|
-
import {
|
|
4
|
+
import { ExporterMetrics } from "./ExporterMetrics.cjs";
|
|
5
5
|
import { ISerializer } from "@opentelemetry/otlp-transformer";
|
|
6
|
-
|
|
7
|
-
declare function createOtlpNetworkExportDelegate<Internal, Response>(options: OtlpSharedConfiguration, serializer: ISerializer<Internal, Response>, metrics: ExporterMetrics<Internal>, transport: IExporterTransport): IOtlpExportDelegate<Internal>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { createOtlpNetworkExportDelegate };
|
|
6
|
+
export declare function createOtlpNetworkExportDelegate<Internal, Response>(options: OtlpSharedConfiguration, serializer: ISerializer<Internal, Response>, metrics: ExporterMetrics<Internal>, transport: IExporterTransport): IOtlpExportDelegate<Internal>;
|
|
10
7
|
//# sourceMappingURL=otlp-network-export-delegate.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otlp-network-export-delegate.d.cts","names":[],"sources":["../src/otlp-network-export-delegate.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"otlp-network-export-delegate.d.cts","names":[],"sources":["../src/otlp-network-export-delegate.d.ts"],"mappings":";;;;;wBAKwB,gCAAgC,UAAU,UAAU,SAAS,yBAAyB,YAAY,YAAY,UAAU,WAAW,SAAS,gBAAgB,WAAW,WAAW,qBAAqB,oBAAoB"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
+
import { OtlpSharedConfiguration } from "./configuration/shared-configuration.mjs";
|
|
1
2
|
import { IExporterTransport } from "./exporter-transport.mjs";
|
|
2
|
-
import { ExporterMetrics } from "./ExporterMetrics.mjs";
|
|
3
3
|
import { IOtlpExportDelegate } from "./otlp-export-delegate.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { ExporterMetrics } from "./ExporterMetrics.mjs";
|
|
5
5
|
import { ISerializer } from "@opentelemetry/otlp-transformer";
|
|
6
|
-
|
|
7
|
-
declare function createOtlpNetworkExportDelegate<Internal, Response>(options: OtlpSharedConfiguration, serializer: ISerializer<Internal, Response>, metrics: ExporterMetrics<Internal>, transport: IExporterTransport): IOtlpExportDelegate<Internal>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { createOtlpNetworkExportDelegate };
|
|
6
|
+
export declare function createOtlpNetworkExportDelegate<Internal, Response>(options: OtlpSharedConfiguration, serializer: ISerializer<Internal, Response>, metrics: ExporterMetrics<Internal>, transport: IExporterTransport): IOtlpExportDelegate<Internal>;
|
|
10
7
|
//# sourceMappingURL=otlp-network-export-delegate.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otlp-network-export-delegate.d.mts","names":[],"sources":["../src/otlp-network-export-delegate.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"otlp-network-export-delegate.d.mts","names":[],"sources":["../src/otlp-network-export-delegate.d.ts"],"mappings":";;;;;wBAKwB,gCAAgC,UAAU,UAAU,SAAS,yBAAyB,YAAY,YAAY,UAAU,WAAW,SAAS,gBAAgB,WAAW,WAAW,qBAAqB,oBAAoB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createBoundedQueueExportPromiseHandler } from "./bounded-queue-export-promise-handler.mjs";
|
|
2
2
|
import { createOtlpExportDelegate } from "./otlp-export-delegate.mjs";
|
|
3
|
-
|
|
3
|
+
// src/otlp-network-export-delegate.ts
|
|
4
4
|
function createOtlpNetworkExportDelegate(options, serializer, metrics, transport) {
|
|
5
5
|
return createOtlpExportDelegate({
|
|
6
6
|
transport,
|
|
@@ -9,7 +9,6 @@ function createOtlpNetworkExportDelegate(options, serializer, metrics, transport
|
|
|
9
9
|
metrics
|
|
10
10
|
}, { timeout: options.timeoutMillis });
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
12
|
export { createOtlpNetworkExportDelegate };
|
|
14
13
|
|
|
15
14
|
//# sourceMappingURL=otlp-network-export-delegate.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_otlp_http_configuration = require("../../../configuration/otlp-http-configuration.cjs");
|
|
2
2
|
const require_convert_legacy_http_options = require("../../../configuration/convert-legacy-http-options.cjs");
|
|
3
|
-
|
|
3
|
+
// src/platform/browser/configuration/convert-legacy-browser-http-options.ts
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated this will be removed in 2.0
|
|
6
6
|
*
|
|
@@ -16,7 +16,6 @@ function convertLegacyBrowserHttpOptions(config, signalResourcePath, requiredHea
|
|
|
16
16
|
concurrencyLimit: config.concurrencyLimit
|
|
17
17
|
}, {}, require_otlp_http_configuration.getHttpConfigurationDefaults(requiredHeaders, signalResourcePath));
|
|
18
18
|
}
|
|
19
|
-
//#endregion
|
|
20
19
|
exports.convertLegacyBrowserHttpOptions = convertLegacyBrowserHttpOptions;
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=convert-legacy-browser-http-options.cjs.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { OtlpHttpConfiguration } from "../../../configuration/otlp-http-configuration.cjs";
|
|
2
2
|
import { OTLPExporterConfigBase } from "../../../configuration/legacy-base-configuration.cjs";
|
|
3
|
-
//#region src/platform/browser/configuration/convert-legacy-browser-http-options.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* @deprecated this will be removed in 2.0
|
|
6
5
|
*
|
|
@@ -8,7 +7,5 @@ import { OTLPExporterConfigBase } from "../../../configuration/legacy-base-confi
|
|
|
8
7
|
* @param signalResourcePath
|
|
9
8
|
* @param requiredHeaders
|
|
10
9
|
*/
|
|
11
|
-
declare function convertLegacyBrowserHttpOptions(config: OTLPExporterConfigBase, signalResourcePath: string, requiredHeaders: Record<string, string>): OtlpHttpConfiguration;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { convertLegacyBrowserHttpOptions };
|
|
10
|
+
export declare function convertLegacyBrowserHttpOptions(config: OTLPExporterConfigBase, signalResourcePath: string, requiredHeaders: Record<string, string>): OtlpHttpConfiguration;
|
|
14
11
|
//# sourceMappingURL=convert-legacy-browser-http-options.d.cts.map
|