@opentelemetry/otlp-exporter-base 0.222.0 → 0.300.0-development.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ExporterMetrics.cjs +80 -0
- package/dist/ExporterMetrics.cjs.map +1 -0
- package/dist/ExporterMetrics.d.cts +27 -0
- package/dist/ExporterMetrics.d.cts.map +1 -0
- package/dist/ExporterMetrics.d.mts +27 -0
- package/dist/ExporterMetrics.d.mts.map +1 -0
- package/dist/ExporterMetrics.mjs +80 -0
- package/dist/ExporterMetrics.mjs.map +1 -0
- package/dist/OTLPExporterBase.cjs +28 -0
- package/dist/OTLPExporterBase.cjs.map +1 -0
- package/dist/OTLPExporterBase.d.cts +20 -0
- package/dist/OTLPExporterBase.d.cts.map +1 -0
- package/dist/OTLPExporterBase.d.mts +20 -0
- package/dist/OTLPExporterBase.d.mts.map +1 -0
- package/dist/OTLPExporterBase.mjs +28 -0
- package/dist/OTLPExporterBase.mjs.map +1 -0
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/bounded-queue-export-promise-handler.cjs +37 -0
- package/dist/bounded-queue-export-promise-handler.cjs.map +1 -0
- package/dist/bounded-queue-export-promise-handler.mjs +37 -0
- package/dist/bounded-queue-export-promise-handler.mjs.map +1 -0
- package/dist/configuration/convert-legacy-browser-http-options.cjs +22 -0
- package/dist/configuration/convert-legacy-browser-http-options.cjs.map +1 -0
- package/dist/configuration/convert-legacy-browser-http-options.d.cts +14 -0
- package/dist/configuration/convert-legacy-browser-http-options.d.cts.map +1 -0
- package/dist/configuration/convert-legacy-browser-http-options.d.mts +14 -0
- package/dist/configuration/convert-legacy-browser-http-options.d.mts.map +1 -0
- package/dist/configuration/convert-legacy-browser-http-options.mjs +22 -0
- package/dist/configuration/convert-legacy-browser-http-options.mjs.map +1 -0
- package/dist/configuration/convert-legacy-http-options.cjs +10 -0
- package/dist/configuration/convert-legacy-http-options.cjs.map +1 -0
- package/dist/configuration/convert-legacy-http-options.mjs +10 -0
- package/dist/configuration/convert-legacy-http-options.mjs.map +1 -0
- package/dist/configuration/convert-legacy-node-http-options.cjs +38 -0
- package/{build/src/configuration/convert-legacy-node-http-options.js.map → dist/configuration/convert-legacy-node-http-options.cjs.map} +1 -1
- package/dist/configuration/convert-legacy-node-http-options.d.cts +14 -0
- package/dist/configuration/convert-legacy-node-http-options.d.cts.map +1 -0
- package/dist/configuration/convert-legacy-node-http-options.d.mts +14 -0
- package/dist/configuration/convert-legacy-node-http-options.d.mts.map +1 -0
- package/dist/configuration/convert-legacy-node-http-options.mjs +38 -0
- package/dist/configuration/convert-legacy-node-http-options.mjs.map +1 -0
- package/dist/configuration/create-legacy-browser-delegate.cjs +41 -0
- package/{build/esm/configuration/create-legacy-browser-delegate.js.map → dist/configuration/create-legacy-browser-delegate.cjs.map} +1 -1
- package/dist/configuration/create-legacy-browser-delegate.d.cts +21 -0
- package/dist/configuration/create-legacy-browser-delegate.d.cts.map +1 -0
- package/dist/configuration/create-legacy-browser-delegate.d.mts +21 -0
- package/dist/configuration/create-legacy-browser-delegate.d.mts.map +1 -0
- package/dist/configuration/create-legacy-browser-delegate.mjs +40 -0
- package/dist/configuration/create-legacy-browser-delegate.mjs.map +1 -0
- package/dist/configuration/legacy-base-configuration.d.cts +55 -0
- package/dist/configuration/legacy-base-configuration.d.cts.map +1 -0
- package/dist/configuration/legacy-base-configuration.d.mts +55 -0
- package/dist/configuration/legacy-base-configuration.d.mts.map +1 -0
- package/dist/configuration/legacy-node-configuration.cjs +10 -0
- package/dist/configuration/legacy-node-configuration.cjs.map +1 -0
- package/dist/configuration/legacy-node-configuration.d.cts +63 -0
- package/dist/configuration/legacy-node-configuration.d.cts.map +1 -0
- package/dist/configuration/legacy-node-configuration.d.mts +63 -0
- package/dist/configuration/legacy-node-configuration.d.mts.map +1 -0
- package/dist/configuration/legacy-node-configuration.mjs +10 -0
- package/dist/configuration/legacy-node-configuration.mjs.map +1 -0
- package/dist/configuration/otlp-http-configuration.cjs +45 -0
- package/dist/configuration/otlp-http-configuration.cjs.map +1 -0
- package/dist/configuration/otlp-http-configuration.d.cts +10 -0
- package/dist/configuration/otlp-http-configuration.d.cts.map +1 -0
- package/dist/configuration/otlp-http-configuration.d.mts +10 -0
- package/dist/configuration/otlp-http-configuration.d.mts.map +1 -0
- package/dist/configuration/otlp-http-configuration.mjs +44 -0
- package/dist/configuration/otlp-http-configuration.mjs.map +1 -0
- package/dist/configuration/otlp-node-http-configuration.cjs +37 -0
- package/dist/configuration/otlp-node-http-configuration.cjs.map +1 -0
- package/dist/configuration/otlp-node-http-configuration.d.cts +29 -0
- package/dist/configuration/otlp-node-http-configuration.d.cts.map +1 -0
- package/dist/configuration/otlp-node-http-configuration.d.mts +29 -0
- package/dist/configuration/otlp-node-http-configuration.d.mts.map +1 -0
- package/dist/configuration/otlp-node-http-configuration.mjs +35 -0
- package/dist/configuration/otlp-node-http-configuration.mjs.map +1 -0
- package/dist/configuration/otlp-node-http-env-configuration.cjs +98 -0
- package/dist/configuration/otlp-node-http-env-configuration.cjs.map +1 -0
- package/dist/configuration/otlp-node-http-env-configuration.mjs +95 -0
- package/dist/configuration/otlp-node-http-env-configuration.mjs.map +1 -0
- package/dist/configuration/shared-configuration.cjs +35 -0
- package/dist/configuration/shared-configuration.cjs.map +1 -0
- package/dist/configuration/shared-configuration.d.cts +24 -0
- package/dist/configuration/shared-configuration.d.cts.map +1 -0
- package/dist/configuration/shared-configuration.d.mts +24 -0
- package/dist/configuration/shared-configuration.d.mts.map +1 -0
- package/dist/configuration/shared-configuration.mjs +32 -0
- package/dist/configuration/shared-configuration.mjs.map +1 -0
- package/dist/configuration/shared-env-configuration.cjs +35 -0
- package/dist/configuration/shared-env-configuration.cjs.map +1 -0
- package/dist/configuration/shared-env-configuration.d.cts +6 -0
- package/dist/configuration/shared-env-configuration.d.cts.map +1 -0
- package/dist/configuration/shared-env-configuration.d.mts +6 -0
- package/dist/configuration/shared-env-configuration.d.mts.map +1 -0
- package/dist/configuration/shared-env-configuration.mjs +35 -0
- package/dist/configuration/shared-env-configuration.mjs.map +1 -0
- package/dist/export-response.d.cts +18 -0
- package/dist/export-response.d.cts.map +1 -0
- package/dist/export-response.d.mts +18 -0
- package/dist/export-response.d.mts.map +1 -0
- package/dist/exporter-transport.d.cts +9 -0
- package/dist/exporter-transport.d.cts.map +1 -0
- package/dist/exporter-transport.d.mts +9 -0
- package/dist/exporter-transport.d.mts.map +1 -0
- package/dist/index-browser-http.cjs +8 -0
- package/dist/index-browser-http.d.cts +4 -0
- package/dist/index-browser-http.d.mts +4 -0
- package/dist/index-browser-http.mjs +4 -0
- package/dist/index-node-http.cjs +10 -0
- package/dist/index-node-http.d.cts +5 -0
- package/dist/index-node-http.d.mts +5 -0
- package/dist/index-node-http.mjs +5 -0
- package/dist/index.cjs +14 -0
- package/dist/index.d.cts +11 -0
- package/dist/index.d.mts +11 -0
- package/dist/index.mjs +7 -0
- package/dist/is-export-retryable.cjs +17 -0
- package/dist/is-export-retryable.cjs.map +1 -0
- package/dist/is-export-retryable.mjs +16 -0
- package/dist/is-export-retryable.mjs.map +1 -0
- package/dist/logging-response-handler.cjs +18 -0
- package/{build/src/logging-response-handler.js.map → dist/logging-response-handler.cjs.map} +1 -1
- package/dist/logging-response-handler.mjs +18 -0
- package/dist/logging-response-handler.mjs.map +1 -0
- package/dist/otlp-browser-http-export-delegate.cjs +18 -0
- package/dist/otlp-browser-http-export-delegate.cjs.map +1 -0
- package/dist/otlp-browser-http-export-delegate.d.cts +12 -0
- package/dist/otlp-browser-http-export-delegate.d.cts.map +1 -0
- package/dist/otlp-browser-http-export-delegate.d.mts +12 -0
- package/dist/otlp-browser-http-export-delegate.d.mts.map +1 -0
- package/dist/otlp-browser-http-export-delegate.mjs +17 -0
- package/dist/otlp-browser-http-export-delegate.mjs.map +1 -0
- package/dist/otlp-export-delegate.cjs +101 -0
- package/dist/otlp-export-delegate.cjs.map +1 -0
- package/dist/otlp-export-delegate.d.cts +16 -0
- package/dist/otlp-export-delegate.d.cts.map +1 -0
- package/dist/otlp-export-delegate.d.mts +16 -0
- package/dist/otlp-export-delegate.d.mts.map +1 -0
- package/dist/otlp-export-delegate.mjs +101 -0
- package/dist/otlp-export-delegate.mjs.map +1 -0
- package/dist/otlp-http-export-delegate.cjs +34 -0
- package/dist/otlp-http-export-delegate.cjs.map +1 -0
- package/dist/otlp-http-export-delegate.d.cts +11 -0
- package/dist/otlp-http-export-delegate.d.cts.map +1 -0
- package/dist/otlp-http-export-delegate.d.mts +11 -0
- package/dist/otlp-http-export-delegate.d.mts.map +1 -0
- package/dist/otlp-http-export-delegate.mjs +33 -0
- package/dist/otlp-http-export-delegate.mjs.map +1 -0
- package/dist/otlp-network-export-delegate.cjs +15 -0
- package/dist/otlp-network-export-delegate.cjs.map +1 -0
- package/dist/otlp-network-export-delegate.d.cts +10 -0
- package/dist/otlp-network-export-delegate.d.cts.map +1 -0
- package/dist/otlp-network-export-delegate.d.mts +10 -0
- package/dist/otlp-network-export-delegate.d.mts.map +1 -0
- package/dist/otlp-network-export-delegate.mjs +15 -0
- package/dist/otlp-network-export-delegate.mjs.map +1 -0
- package/dist/retrying-transport.cjs +62 -0
- package/dist/retrying-transport.cjs.map +1 -0
- package/dist/retrying-transport.mjs +62 -0
- package/dist/retrying-transport.mjs.map +1 -0
- package/dist/semconv.cjs +100 -0
- package/dist/semconv.cjs.map +1 -0
- package/dist/semconv.mjs +95 -0
- package/dist/semconv.mjs.map +1 -0
- package/dist/transport/fetch-transport.cjs +159 -0
- package/dist/transport/fetch-transport.cjs.map +1 -0
- package/dist/transport/fetch-transport.mjs +159 -0
- package/dist/transport/fetch-transport.mjs.map +1 -0
- package/dist/transport/http-exporter-transport.cjs +38 -0
- package/dist/transport/http-exporter-transport.cjs.map +1 -0
- package/dist/transport/http-exporter-transport.mjs +38 -0
- package/dist/transport/http-exporter-transport.mjs.map +1 -0
- package/dist/transport/http-transport-utils.cjs +136 -0
- package/dist/transport/http-transport-utils.cjs.map +1 -0
- package/dist/transport/http-transport-utils.mjs +132 -0
- package/dist/transport/http-transport-utils.mjs.map +1 -0
- package/dist/types.cjs +18 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +13 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +13 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +18 -0
- package/dist/types.mjs.map +1 -0
- package/dist/util.cjs +18 -0
- package/dist/util.cjs.map +1 -0
- package/dist/util.mjs +18 -0
- package/dist/util.mjs.map +1 -0
- package/dist/version.cjs +6 -0
- package/dist/version.cjs.map +1 -0
- package/dist/version.mjs +6 -0
- package/dist/version.mjs.map +1 -0
- package/package.json +43 -41
- package/build/esm/ExporterMetrics.d.ts +0 -24
- package/build/esm/ExporterMetrics.js +0 -104
- package/build/esm/ExporterMetrics.js.map +0 -1
- package/build/esm/OTLPExporterBase.d.ts +0 -17
- package/build/esm/OTLPExporterBase.js +0 -28
- package/build/esm/OTLPExporterBase.js.map +0 -1
- package/build/esm/bounded-queue-export-promise-handler.d.ts +0 -13
- package/build/esm/bounded-queue-export-promise-handler.js +0 -39
- package/build/esm/bounded-queue-export-promise-handler.js.map +0 -1
- package/build/esm/configuration/convert-legacy-browser-http-options.d.ts +0 -11
- package/build/esm/configuration/convert-legacy-browser-http-options.js +0 -19
- package/build/esm/configuration/convert-legacy-browser-http-options.js.map +0 -1
- package/build/esm/configuration/convert-legacy-http-options.d.ts +0 -4
- package/build/esm/configuration/convert-legacy-http-options.js +0 -12
- package/build/esm/configuration/convert-legacy-http-options.js.map +0 -1
- package/build/esm/configuration/convert-legacy-node-http-options.d.ts +0 -11
- package/build/esm/configuration/convert-legacy-node-http-options.js +0 -43
- package/build/esm/configuration/convert-legacy-node-http-options.js.map +0 -1
- package/build/esm/configuration/create-legacy-browser-delegate.d.ts +0 -18
- package/build/esm/configuration/create-legacy-browser-delegate.js +0 -48
- package/build/esm/configuration/legacy-base-configuration.d.ts +0 -52
- package/build/esm/configuration/legacy-base-configuration.js +0 -2
- package/build/esm/configuration/legacy-base-configuration.js.map +0 -1
- package/build/esm/configuration/legacy-node-configuration.d.ts +0 -61
- package/build/esm/configuration/legacy-node-configuration.js +0 -10
- package/build/esm/configuration/legacy-node-configuration.js.map +0 -1
- package/build/esm/configuration/otlp-http-configuration.d.ts +0 -14
- package/build/esm/configuration/otlp-http-configuration.js +0 -59
- package/build/esm/configuration/otlp-http-configuration.js.map +0 -1
- package/build/esm/configuration/otlp-node-http-configuration.d.ts +0 -34
- package/build/esm/configuration/otlp-node-http-configuration.js +0 -35
- package/build/esm/configuration/otlp-node-http-configuration.js.map +0 -1
- package/build/esm/configuration/otlp-node-http-env-configuration.d.ts +0 -9
- package/build/esm/configuration/otlp-node-http-env-configuration.js +0 -119
- package/build/esm/configuration/otlp-node-http-env-configuration.js.map +0 -1
- package/build/esm/configuration/shared-configuration.d.ts +0 -24
- package/build/esm/configuration/shared-configuration.js +0 -42
- package/build/esm/configuration/shared-configuration.js.map +0 -1
- package/build/esm/configuration/shared-env-configuration.d.ts +0 -3
- package/build/esm/configuration/shared-env-configuration.js +0 -41
- package/build/esm/configuration/shared-env-configuration.js.map +0 -1
- package/build/esm/export-response.d.ts +0 -15
- package/build/esm/export-response.js +0 -6
- package/build/esm/export-response.js.map +0 -1
- package/build/esm/exporter-transport.d.ts +0 -6
- package/build/esm/exporter-transport.js +0 -6
- package/build/esm/exporter-transport.js.map +0 -1
- package/build/esm/index-browser-http.d.ts +0 -7
- package/build/esm/index-browser-http.js +0 -11
- package/build/esm/index-browser-http.js.map +0 -1
- package/build/esm/index-node-http.d.ts +0 -5
- package/build/esm/index-node-http.js +0 -9
- package/build/esm/index-node-http.js.map +0 -1
- package/build/esm/index.d.ts +0 -13
- package/build/esm/index.js +0 -11
- package/build/esm/index.js.map +0 -1
- package/build/esm/is-export-retryable.d.ts +0 -3
- package/build/esm/is-export-retryable.js +0 -26
- package/build/esm/is-export-retryable.js.map +0 -1
- package/build/esm/logging-response-handler.d.ts +0 -6
- package/build/esm/logging-response-handler.js +0 -27
- package/build/esm/logging-response-handler.js.map +0 -1
- package/build/esm/otlp-browser-http-export-delegate.d.ts +0 -10
- package/build/esm/otlp-browser-http-export-delegate.js +0 -19
- package/build/esm/otlp-browser-http-export-delegate.js.map +0 -1
- package/build/esm/otlp-export-delegate.d.ts +0 -27
- package/build/esm/otlp-export-delegate.js +0 -114
- package/build/esm/otlp-export-delegate.js.map +0 -1
- package/build/esm/otlp-http-export-delegate.d.ts +0 -8
- package/build/esm/otlp-http-export-delegate.js +0 -43
- package/build/esm/otlp-http-export-delegate.js.map +0 -1
- package/build/esm/otlp-network-export-delegate.d.ts +0 -7
- package/build/esm/otlp-network-export-delegate.js +0 -15
- package/build/esm/otlp-network-export-delegate.js.map +0 -1
- package/build/esm/response-handler.d.ts +0 -12
- package/build/esm/response-handler.js +0 -6
- package/build/esm/response-handler.js.map +0 -1
- package/build/esm/retrying-transport.d.ts +0 -8
- package/build/esm/retrying-transport.js +0 -70
- package/build/esm/retrying-transport.js.map +0 -1
- package/build/esm/semconv.d.ts +0 -91
- package/build/esm/semconv.js +0 -100
- package/build/esm/semconv.js.map +0 -1
- package/build/esm/transport/fetch-transport.d.ts +0 -12
- package/build/esm/transport/fetch-transport.js +0 -133
- package/build/esm/transport/fetch-transport.js.map +0 -1
- package/build/esm/transport/http-exporter-transport.d.ts +0 -4
- package/build/esm/transport/http-exporter-transport.js +0 -41
- package/build/esm/transport/http-exporter-transport.js.map +0 -1
- package/build/esm/transport/http-transport-types.d.ts +0 -8
- package/build/esm/transport/http-transport-types.js +0 -6
- package/build/esm/transport/http-transport-types.js.map +0 -1
- package/build/esm/transport/http-transport-utils.d.ts +0 -25
- package/build/esm/transport/http-transport-utils.js +0 -167
- package/build/esm/transport/http-transport-utils.js.map +0 -1
- package/build/esm/transport/node-http-transport-types.d.ts +0 -6
- package/build/esm/transport/node-http-transport-types.js +0 -6
- package/build/esm/transport/node-http-transport-types.js.map +0 -1
- package/build/esm/types.d.ts +0 -23
- package/build/esm/types.js +0 -18
- package/build/esm/types.js.map +0 -1
- package/build/esm/util.d.ts +0 -6
- package/build/esm/util.js +0 -22
- package/build/esm/util.js.map +0 -1
- package/build/esm/version.d.ts +0 -2
- package/build/esm/version.js +0 -7
- package/build/esm/version.js.map +0 -1
- package/build/esnext/ExporterMetrics.d.ts +0 -24
- package/build/esnext/ExporterMetrics.js +0 -104
- package/build/esnext/ExporterMetrics.js.map +0 -1
- package/build/esnext/OTLPExporterBase.d.ts +0 -17
- package/build/esnext/OTLPExporterBase.js +0 -28
- package/build/esnext/OTLPExporterBase.js.map +0 -1
- package/build/esnext/bounded-queue-export-promise-handler.d.ts +0 -13
- package/build/esnext/bounded-queue-export-promise-handler.js +0 -39
- package/build/esnext/bounded-queue-export-promise-handler.js.map +0 -1
- package/build/esnext/configuration/convert-legacy-browser-http-options.d.ts +0 -11
- package/build/esnext/configuration/convert-legacy-browser-http-options.js +0 -19
- package/build/esnext/configuration/convert-legacy-browser-http-options.js.map +0 -1
- package/build/esnext/configuration/convert-legacy-http-options.d.ts +0 -4
- package/build/esnext/configuration/convert-legacy-http-options.js +0 -12
- package/build/esnext/configuration/convert-legacy-http-options.js.map +0 -1
- package/build/esnext/configuration/convert-legacy-node-http-options.d.ts +0 -11
- package/build/esnext/configuration/convert-legacy-node-http-options.js +0 -43
- package/build/esnext/configuration/convert-legacy-node-http-options.js.map +0 -1
- package/build/esnext/configuration/create-legacy-browser-delegate.d.ts +0 -18
- package/build/esnext/configuration/create-legacy-browser-delegate.js +0 -48
- package/build/esnext/configuration/create-legacy-browser-delegate.js.map +0 -1
- package/build/esnext/configuration/legacy-base-configuration.d.ts +0 -52
- package/build/esnext/configuration/legacy-base-configuration.js +0 -2
- package/build/esnext/configuration/legacy-base-configuration.js.map +0 -1
- package/build/esnext/configuration/legacy-node-configuration.d.ts +0 -61
- package/build/esnext/configuration/legacy-node-configuration.js +0 -10
- package/build/esnext/configuration/legacy-node-configuration.js.map +0 -1
- package/build/esnext/configuration/otlp-http-configuration.d.ts +0 -14
- package/build/esnext/configuration/otlp-http-configuration.js +0 -59
- package/build/esnext/configuration/otlp-http-configuration.js.map +0 -1
- package/build/esnext/configuration/otlp-node-http-configuration.d.ts +0 -34
- package/build/esnext/configuration/otlp-node-http-configuration.js +0 -35
- package/build/esnext/configuration/otlp-node-http-configuration.js.map +0 -1
- package/build/esnext/configuration/otlp-node-http-env-configuration.d.ts +0 -9
- package/build/esnext/configuration/otlp-node-http-env-configuration.js +0 -119
- package/build/esnext/configuration/otlp-node-http-env-configuration.js.map +0 -1
- package/build/esnext/configuration/shared-configuration.d.ts +0 -24
- package/build/esnext/configuration/shared-configuration.js +0 -42
- package/build/esnext/configuration/shared-configuration.js.map +0 -1
- package/build/esnext/configuration/shared-env-configuration.d.ts +0 -3
- package/build/esnext/configuration/shared-env-configuration.js +0 -41
- package/build/esnext/configuration/shared-env-configuration.js.map +0 -1
- package/build/esnext/export-response.d.ts +0 -15
- package/build/esnext/export-response.js +0 -6
- package/build/esnext/export-response.js.map +0 -1
- package/build/esnext/exporter-transport.d.ts +0 -6
- package/build/esnext/exporter-transport.js +0 -6
- package/build/esnext/exporter-transport.js.map +0 -1
- package/build/esnext/index-browser-http.d.ts +0 -7
- package/build/esnext/index-browser-http.js +0 -11
- package/build/esnext/index-browser-http.js.map +0 -1
- package/build/esnext/index-node-http.d.ts +0 -5
- package/build/esnext/index-node-http.js +0 -9
- package/build/esnext/index-node-http.js.map +0 -1
- package/build/esnext/index.d.ts +0 -13
- package/build/esnext/index.js +0 -11
- package/build/esnext/index.js.map +0 -1
- package/build/esnext/is-export-retryable.d.ts +0 -3
- package/build/esnext/is-export-retryable.js +0 -26
- package/build/esnext/is-export-retryable.js.map +0 -1
- package/build/esnext/logging-response-handler.d.ts +0 -6
- package/build/esnext/logging-response-handler.js +0 -27
- package/build/esnext/logging-response-handler.js.map +0 -1
- package/build/esnext/otlp-browser-http-export-delegate.d.ts +0 -10
- package/build/esnext/otlp-browser-http-export-delegate.js +0 -19
- package/build/esnext/otlp-browser-http-export-delegate.js.map +0 -1
- package/build/esnext/otlp-export-delegate.d.ts +0 -27
- package/build/esnext/otlp-export-delegate.js +0 -114
- package/build/esnext/otlp-export-delegate.js.map +0 -1
- package/build/esnext/otlp-http-export-delegate.d.ts +0 -8
- package/build/esnext/otlp-http-export-delegate.js +0 -43
- package/build/esnext/otlp-http-export-delegate.js.map +0 -1
- package/build/esnext/otlp-network-export-delegate.d.ts +0 -7
- package/build/esnext/otlp-network-export-delegate.js +0 -15
- package/build/esnext/otlp-network-export-delegate.js.map +0 -1
- package/build/esnext/response-handler.d.ts +0 -12
- package/build/esnext/response-handler.js +0 -6
- package/build/esnext/response-handler.js.map +0 -1
- package/build/esnext/retrying-transport.d.ts +0 -8
- package/build/esnext/retrying-transport.js +0 -70
- package/build/esnext/retrying-transport.js.map +0 -1
- package/build/esnext/semconv.d.ts +0 -91
- package/build/esnext/semconv.js +0 -100
- package/build/esnext/semconv.js.map +0 -1
- package/build/esnext/transport/fetch-transport.d.ts +0 -12
- package/build/esnext/transport/fetch-transport.js +0 -133
- package/build/esnext/transport/fetch-transport.js.map +0 -1
- package/build/esnext/transport/http-exporter-transport.d.ts +0 -4
- package/build/esnext/transport/http-exporter-transport.js +0 -41
- package/build/esnext/transport/http-exporter-transport.js.map +0 -1
- package/build/esnext/transport/http-transport-types.d.ts +0 -8
- package/build/esnext/transport/http-transport-types.js +0 -6
- package/build/esnext/transport/http-transport-types.js.map +0 -1
- package/build/esnext/transport/http-transport-utils.d.ts +0 -25
- package/build/esnext/transport/http-transport-utils.js +0 -167
- package/build/esnext/transport/http-transport-utils.js.map +0 -1
- package/build/esnext/transport/node-http-transport-types.d.ts +0 -6
- package/build/esnext/transport/node-http-transport-types.js +0 -6
- package/build/esnext/transport/node-http-transport-types.js.map +0 -1
- package/build/esnext/types.d.ts +0 -23
- package/build/esnext/types.js +0 -18
- package/build/esnext/types.js.map +0 -1
- package/build/esnext/util.d.ts +0 -6
- package/build/esnext/util.js +0 -22
- package/build/esnext/util.js.map +0 -1
- package/build/esnext/version.d.ts +0 -2
- package/build/esnext/version.js +0 -7
- package/build/esnext/version.js.map +0 -1
- package/build/src/ExporterMetrics.d.ts +0 -24
- package/build/src/ExporterMetrics.js +0 -108
- package/build/src/ExporterMetrics.js.map +0 -1
- package/build/src/OTLPExporterBase.d.ts +0 -17
- package/build/src/OTLPExporterBase.js +0 -32
- package/build/src/OTLPExporterBase.js.map +0 -1
- package/build/src/bounded-queue-export-promise-handler.d.ts +0 -13
- package/build/src/bounded-queue-export-promise-handler.js +0 -43
- package/build/src/bounded-queue-export-promise-handler.js.map +0 -1
- package/build/src/configuration/convert-legacy-browser-http-options.d.ts +0 -11
- package/build/src/configuration/convert-legacy-browser-http-options.js +0 -23
- package/build/src/configuration/convert-legacy-browser-http-options.js.map +0 -1
- package/build/src/configuration/convert-legacy-http-options.d.ts +0 -4
- package/build/src/configuration/convert-legacy-http-options.js +0 -16
- package/build/src/configuration/convert-legacy-http-options.js.map +0 -1
- package/build/src/configuration/convert-legacy-node-http-options.d.ts +0 -11
- package/build/src/configuration/convert-legacy-node-http-options.js +0 -47
- package/build/src/configuration/create-legacy-browser-delegate.d.ts +0 -18
- package/build/src/configuration/create-legacy-browser-delegate.js +0 -53
- package/build/src/configuration/create-legacy-browser-delegate.js.map +0 -1
- package/build/src/configuration/legacy-base-configuration.d.ts +0 -52
- package/build/src/configuration/legacy-base-configuration.js +0 -3
- package/build/src/configuration/legacy-base-configuration.js.map +0 -1
- package/build/src/configuration/legacy-node-configuration.d.ts +0 -61
- package/build/src/configuration/legacy-node-configuration.js +0 -13
- package/build/src/configuration/legacy-node-configuration.js.map +0 -1
- package/build/src/configuration/otlp-http-configuration.d.ts +0 -14
- package/build/src/configuration/otlp-http-configuration.js +0 -64
- package/build/src/configuration/otlp-http-configuration.js.map +0 -1
- package/build/src/configuration/otlp-node-http-configuration.d.ts +0 -34
- package/build/src/configuration/otlp-node-http-configuration.js +0 -41
- package/build/src/configuration/otlp-node-http-configuration.js.map +0 -1
- package/build/src/configuration/otlp-node-http-env-configuration.d.ts +0 -9
- package/build/src/configuration/otlp-node-http-env-configuration.js +0 -123
- package/build/src/configuration/otlp-node-http-env-configuration.js.map +0 -1
- package/build/src/configuration/shared-configuration.d.ts +0 -24
- package/build/src/configuration/shared-configuration.js +0 -49
- package/build/src/configuration/shared-configuration.js.map +0 -1
- package/build/src/configuration/shared-env-configuration.d.ts +0 -3
- package/build/src/configuration/shared-env-configuration.js +0 -45
- package/build/src/configuration/shared-env-configuration.js.map +0 -1
- package/build/src/export-response.d.ts +0 -15
- package/build/src/export-response.js +0 -7
- package/build/src/export-response.js.map +0 -1
- package/build/src/exporter-transport.d.ts +0 -6
- package/build/src/exporter-transport.js +0 -7
- package/build/src/exporter-transport.js.map +0 -1
- package/build/src/index-browser-http.d.ts +0 -7
- package/build/src/index-browser-http.js +0 -18
- package/build/src/index-browser-http.js.map +0 -1
- package/build/src/index-node-http.d.ts +0 -5
- package/build/src/index-node-http.js +0 -17
- package/build/src/index-node-http.js.map +0 -1
- package/build/src/index.d.ts +0 -13
- package/build/src/index.js +0 -21
- package/build/src/index.js.map +0 -1
- package/build/src/is-export-retryable.d.ts +0 -3
- package/build/src/is-export-retryable.js +0 -31
- package/build/src/is-export-retryable.js.map +0 -1
- package/build/src/logging-response-handler.d.ts +0 -6
- package/build/src/logging-response-handler.js +0 -31
- package/build/src/otlp-browser-http-export-delegate.d.ts +0 -10
- package/build/src/otlp-browser-http-export-delegate.js +0 -24
- package/build/src/otlp-browser-http-export-delegate.js.map +0 -1
- package/build/src/otlp-export-delegate.d.ts +0 -27
- package/build/src/otlp-export-delegate.js +0 -118
- package/build/src/otlp-export-delegate.js.map +0 -1
- package/build/src/otlp-http-export-delegate.d.ts +0 -8
- package/build/src/otlp-http-export-delegate.js +0 -48
- package/build/src/otlp-http-export-delegate.js.map +0 -1
- package/build/src/otlp-network-export-delegate.d.ts +0 -7
- package/build/src/otlp-network-export-delegate.js +0 -19
- package/build/src/otlp-network-export-delegate.js.map +0 -1
- package/build/src/response-handler.d.ts +0 -12
- package/build/src/response-handler.js +0 -7
- package/build/src/response-handler.js.map +0 -1
- package/build/src/retrying-transport.d.ts +0 -8
- package/build/src/retrying-transport.js +0 -74
- package/build/src/retrying-transport.js.map +0 -1
- package/build/src/semconv.d.ts +0 -91
- package/build/src/semconv.js +0 -103
- package/build/src/semconv.js.map +0 -1
- package/build/src/transport/fetch-transport.d.ts +0 -12
- package/build/src/transport/fetch-transport.js +0 -137
- package/build/src/transport/fetch-transport.js.map +0 -1
- package/build/src/transport/http-exporter-transport.d.ts +0 -4
- package/build/src/transport/http-exporter-transport.js +0 -45
- package/build/src/transport/http-exporter-transport.js.map +0 -1
- package/build/src/transport/http-transport-types.d.ts +0 -8
- package/build/src/transport/http-transport-types.js +0 -7
- package/build/src/transport/http-transport-types.js.map +0 -1
- package/build/src/transport/http-transport-utils.d.ts +0 -25
- package/build/src/transport/http-transport-utils.js +0 -172
- package/build/src/transport/http-transport-utils.js.map +0 -1
- package/build/src/transport/node-http-transport-types.d.ts +0 -6
- package/build/src/transport/node-http-transport-types.js +0 -7
- package/build/src/transport/node-http-transport-types.js.map +0 -1
- package/build/src/types.d.ts +0 -23
- package/build/src/types.js +0 -22
- package/build/src/types.js.map +0 -1
- package/build/src/util.d.ts +0 -6
- package/build/src/util.js +0 -26
- package/build/src/util.js.map +0 -1
- package/build/src/version.d.ts +0 -2
- package/build/src/version.js +0 -10
- package/build/src/version.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,36 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/otlp-exporter-base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.300.0-development.1",
|
|
4
4
|
"description": "OpenTelemetry OTLP Exporter base (for internal use only)",
|
|
5
|
-
"main": "
|
|
6
|
-
"
|
|
7
|
-
"esnext": "build/esnext/index.js",
|
|
8
|
-
"types": "build/src/index.d.ts",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"types": "./dist/index.d.cts",
|
|
9
7
|
"exports": {
|
|
10
8
|
".": {
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
"require": {
|
|
10
|
+
"types": "./dist/index.d.cts",
|
|
11
|
+
"default": "./dist/index.cjs"
|
|
12
|
+
},
|
|
13
|
+
"default": {
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"default": "./dist/index.mjs"
|
|
16
|
+
}
|
|
15
17
|
},
|
|
16
18
|
"./node-http": {
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
"require": {
|
|
20
|
+
"types": "./dist/index-node-http.d.cts",
|
|
21
|
+
"default": "./dist/index-node-http.cjs"
|
|
22
|
+
},
|
|
23
|
+
"default": {
|
|
24
|
+
"types": "./dist/index-node-http.d.mts",
|
|
25
|
+
"default": "./dist/index-node-http.mjs"
|
|
26
|
+
}
|
|
21
27
|
},
|
|
22
28
|
"./browser-http": {
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
"require": {
|
|
30
|
+
"types": "./dist/index-browser-http.d.cts",
|
|
31
|
+
"default": "./dist/index-browser-http.cjs"
|
|
32
|
+
},
|
|
33
|
+
"default": {
|
|
34
|
+
"types": "./dist/index-browser-http.d.mts",
|
|
35
|
+
"default": "./dist/index-browser-http.mjs"
|
|
36
|
+
}
|
|
27
37
|
}
|
|
28
38
|
},
|
|
29
39
|
"repository": "open-telemetry/opentelemetry-js",
|
|
30
40
|
"scripts": {
|
|
31
41
|
"prepublishOnly": "npm run compile",
|
|
32
|
-
"compile": "
|
|
33
|
-
"clean": "
|
|
42
|
+
"compile": "tsdown",
|
|
43
|
+
"clean": "rimraf dist build",
|
|
34
44
|
"lint": "eslint .",
|
|
35
45
|
"lint:fix": "eslint . --fix",
|
|
36
46
|
"tdd": "npm run test -- --watch-extensions ts --watch",
|
|
@@ -38,9 +48,8 @@
|
|
|
38
48
|
"test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
|
|
39
49
|
"test:browser": "karma start --single-run",
|
|
40
50
|
"version": "node ../../../scripts/version-update.js",
|
|
41
|
-
"watch": "
|
|
42
|
-
"
|
|
43
|
-
"align-api-deps": "node ../../../scripts/align-api-deps.js",
|
|
51
|
+
"watch": "tsdown --watch --no-clean",
|
|
52
|
+
"align-api-deps": "node ../../../scripts/align-api-deps.mjs",
|
|
44
53
|
"maint:regenerate-test-certs": "cd test/certs && ./regenerate.sh"
|
|
45
54
|
},
|
|
46
55
|
"keywords": [
|
|
@@ -55,32 +64,25 @@
|
|
|
55
64
|
"author": "OpenTelemetry Authors",
|
|
56
65
|
"license": "Apache-2.0",
|
|
57
66
|
"engines": {
|
|
58
|
-
"node": "
|
|
67
|
+
"node": ">=22.15.0"
|
|
59
68
|
},
|
|
60
69
|
"files": [
|
|
61
|
-
"build/esm/**/*.js",
|
|
62
|
-
"build/esm/**/*.js.map",
|
|
63
|
-
"build/esm/**/*.d.ts",
|
|
64
|
-
"build/esnext/**/*.js",
|
|
65
|
-
"build/esnext/**/*.js.map",
|
|
66
|
-
"build/esnext/**/*.d.ts",
|
|
67
|
-
"build/src/**/*.js",
|
|
68
|
-
"build/src/**/*.js.map",
|
|
69
|
-
"build/src/**/*.d.ts",
|
|
70
70
|
"LICENSE",
|
|
71
|
-
"README.md"
|
|
71
|
+
"README.md",
|
|
72
|
+
"dist"
|
|
72
73
|
],
|
|
73
74
|
"publishConfig": {
|
|
74
75
|
"access": "public"
|
|
75
76
|
},
|
|
76
77
|
"dependencies": {
|
|
77
|
-
"@opentelemetry/core": "
|
|
78
|
-
"@opentelemetry/otlp-transformer": "0.
|
|
78
|
+
"@opentelemetry/core": "3.0.0-development.1",
|
|
79
|
+
"@opentelemetry/otlp-transformer": "0.300.0-development.1"
|
|
79
80
|
},
|
|
80
81
|
"devDependencies": {
|
|
81
82
|
"@babel/core": "7.29.7",
|
|
82
83
|
"@babel/preset-env": "7.29.7",
|
|
83
|
-
"@opentelemetry/api": "1.
|
|
84
|
+
"@opentelemetry/api": "1.10.0-development.1",
|
|
85
|
+
"@opentelemetry/sdk-trace": "3.0.0-development.1",
|
|
84
86
|
"@types/mocha": "10.0.10",
|
|
85
87
|
"@types/node": "18.19.130",
|
|
86
88
|
"@types/sinon": "17.0.4",
|
|
@@ -89,20 +91,20 @@
|
|
|
89
91
|
"karma-chrome-launcher": "3.2.0",
|
|
90
92
|
"karma-coverage": "2.2.1",
|
|
91
93
|
"karma-mocha": "2.0.1",
|
|
92
|
-
"karma-spec-reporter": "0.0.
|
|
94
|
+
"karma-spec-reporter": "0.0.37",
|
|
93
95
|
"karma-webpack": "5.0.1",
|
|
94
96
|
"mocha": "11.8.0",
|
|
95
|
-
"nyc": "
|
|
97
|
+
"nyc": "18.0.0",
|
|
96
98
|
"sinon": "18.0.1",
|
|
97
99
|
"ts-loader": "9.5.7",
|
|
98
100
|
"typescript": "5.2.2",
|
|
99
101
|
"webpack": "5.108.4",
|
|
100
|
-
"webpack-cli": "7.2.
|
|
102
|
+
"webpack-cli": "7.2.3"
|
|
101
103
|
},
|
|
102
104
|
"peerDependencies": {
|
|
103
|
-
"@opentelemetry/api": "^1.3.0"
|
|
105
|
+
"@opentelemetry/api": "^1.3.0 || 1.10.0-development.1"
|
|
104
106
|
},
|
|
105
107
|
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-exporter-base",
|
|
106
108
|
"sideEffects": false,
|
|
107
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "83d76963961161511591d5585407d23b5f035a37"
|
|
108
110
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type Attributes, type MeterProvider } from '@opentelemetry/api';
|
|
2
|
-
import { type IExporterMetricsHelper } from '@opentelemetry/otlp-transformer';
|
|
3
|
-
export interface ExporterMetricsOptions<Internal> {
|
|
4
|
-
componentType: string;
|
|
5
|
-
metricsHelper: IExporterMetricsHelper<Internal>;
|
|
6
|
-
url: string | undefined;
|
|
7
|
-
meterProvider: MeterProvider | undefined;
|
|
8
|
-
responseAttributesFromError: (error: Error | string | undefined) => Attributes;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Generates `otel.sdk.exporter.*` metrics.
|
|
12
|
-
* https://opentelemetry.io/docs/specs/semconv/otel/sdk-metrics
|
|
13
|
-
*/
|
|
14
|
-
export declare class ExporterMetrics<Internal> {
|
|
15
|
-
private readonly inflight;
|
|
16
|
-
private readonly exported;
|
|
17
|
-
private readonly duration;
|
|
18
|
-
private readonly standardAttrs;
|
|
19
|
-
private readonly responseAttributesFromError;
|
|
20
|
-
private readonly helper;
|
|
21
|
-
constructor(options: ExporterMetricsOptions<Internal>);
|
|
22
|
-
startExport(request: Internal): (error: Error | string | undefined) => void;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=ExporterMetrics.d.ts.map
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { createNoopMeter, } from '@opentelemetry/api';
|
|
6
|
-
import { hrTime, hrTimeDuration, hrTimeToMilliseconds, } from '@opentelemetry/core';
|
|
7
|
-
import { ATTR_ERROR_TYPE, ATTR_OTEL_COMPONENT_NAME, ATTR_OTEL_COMPONENT_TYPE, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, } from './semconv';
|
|
8
|
-
import { VERSION } from './version';
|
|
9
|
-
const componentCounter = new Map();
|
|
10
|
-
/**
|
|
11
|
-
* Generates `otel.sdk.exporter.*` metrics.
|
|
12
|
-
* https://opentelemetry.io/docs/specs/semconv/otel/sdk-metrics
|
|
13
|
-
*/
|
|
14
|
-
export class ExporterMetrics {
|
|
15
|
-
inflight;
|
|
16
|
-
exported;
|
|
17
|
-
duration;
|
|
18
|
-
standardAttrs;
|
|
19
|
-
responseAttributesFromError;
|
|
20
|
-
helper;
|
|
21
|
-
constructor(options) {
|
|
22
|
-
const { componentType, metricsHelper, meterProvider, url, responseAttributesFromError, } = options;
|
|
23
|
-
this.responseAttributesFromError = responseAttributesFromError;
|
|
24
|
-
const meter = meterProvider
|
|
25
|
-
? meterProvider.getMeter('@opentelemetry/otlp-exporter', VERSION)
|
|
26
|
-
: createNoopMeter();
|
|
27
|
-
const counter = componentCounter.get(componentType) ?? 0;
|
|
28
|
-
componentCounter.set(componentType, counter + 1);
|
|
29
|
-
this.standardAttrs = {
|
|
30
|
-
[ATTR_OTEL_COMPONENT_TYPE]: componentType,
|
|
31
|
-
[ATTR_OTEL_COMPONENT_NAME]: `${componentType}/${counter}`,
|
|
32
|
-
};
|
|
33
|
-
if (url) {
|
|
34
|
-
// URLs may exclude scheme for gRPC endpoints, but in this case they always
|
|
35
|
-
// have a port number. Because the URL constructor requires a scheme, we
|
|
36
|
-
// can still handle gRPC endpoints by prepending an arbitrary scheme.
|
|
37
|
-
let urlToParse = url;
|
|
38
|
-
if (!url.includes('://')) {
|
|
39
|
-
urlToParse = `http://${url}`;
|
|
40
|
-
}
|
|
41
|
-
try {
|
|
42
|
-
const parsedUrl = new URL(urlToParse);
|
|
43
|
-
this.standardAttrs[ATTR_SERVER_ADDRESS] = parsedUrl.hostname;
|
|
44
|
-
let port = undefined;
|
|
45
|
-
if (parsedUrl.port) {
|
|
46
|
-
port = Number(parsedUrl.port);
|
|
47
|
-
}
|
|
48
|
-
else if (parsedUrl.protocol === 'http:') {
|
|
49
|
-
port = 80;
|
|
50
|
-
}
|
|
51
|
-
else if (parsedUrl.protocol === 'https:') {
|
|
52
|
-
port = 443;
|
|
53
|
-
}
|
|
54
|
-
if (typeof port === 'number') {
|
|
55
|
-
this.standardAttrs[ATTR_SERVER_PORT] = port;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
catch {
|
|
59
|
-
// In practice, URLs will be valid or something else will break. Better to let that
|
|
60
|
-
// inform the user than an exception in this internal code and proceed best-effort
|
|
61
|
-
// here.
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
this.helper = metricsHelper;
|
|
65
|
-
this.inflight = meter.createUpDownCounter(`otel.sdk.exporter.${this.helper.name}.inflight`, {
|
|
66
|
-
unit: `{${this.helper.name}}`,
|
|
67
|
-
description: `The number of ${this.helper.name}s which were passed to the exporter, but that have not been exported yet (neither successful, nor failed).`,
|
|
68
|
-
});
|
|
69
|
-
this.exported = meter.createCounter(`otel.sdk.exporter.${this.helper.name}.exported`, {
|
|
70
|
-
unit: `{${this.helper.name}}`,
|
|
71
|
-
description: `The number of ${this.helper.name}s for which the export has finished, either successful or failed.`,
|
|
72
|
-
});
|
|
73
|
-
this.duration = meter.createHistogram('otel.sdk.exporter.operation.duration', {
|
|
74
|
-
unit: 's',
|
|
75
|
-
description: 'The duration of exporting a batch of telemetry records.',
|
|
76
|
-
advice: {
|
|
77
|
-
explicitBucketBoundaries: [],
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
startExport(request) {
|
|
82
|
-
const numItems = this.helper.countItems(request);
|
|
83
|
-
const startTime = hrTime();
|
|
84
|
-
this.inflight.add(numItems, this.standardAttrs);
|
|
85
|
-
return (error) => {
|
|
86
|
-
const endTime = hrTime();
|
|
87
|
-
this.inflight.add(-numItems, this.standardAttrs);
|
|
88
|
-
const exportedAttrs = error
|
|
89
|
-
? {
|
|
90
|
-
...this.standardAttrs,
|
|
91
|
-
[ATTR_ERROR_TYPE]: error instanceof Error ? error.name : 'export_failed',
|
|
92
|
-
}
|
|
93
|
-
: this.standardAttrs;
|
|
94
|
-
this.exported.add(numItems, exportedAttrs);
|
|
95
|
-
const durationAttrs = {
|
|
96
|
-
...exportedAttrs,
|
|
97
|
-
...this.responseAttributesFromError(error),
|
|
98
|
-
};
|
|
99
|
-
const duration = hrTimeToMilliseconds(hrTimeDuration(startTime, endTime)) / 1000;
|
|
100
|
-
this.duration.record(duration, durationAttrs);
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=ExporterMetrics.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExporterMetrics.js","sourceRoot":"","sources":["../../src/ExporterMetrics.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n type Attributes,\n type Counter,\n type Histogram,\n type MeterProvider,\n type UpDownCounter,\n createNoopMeter,\n} from '@opentelemetry/api';\nimport {\n hrTime,\n hrTimeDuration,\n hrTimeToMilliseconds,\n} from '@opentelemetry/core';\nimport { type IExporterMetricsHelper } from '@opentelemetry/otlp-transformer';\nimport {\n ATTR_ERROR_TYPE,\n ATTR_OTEL_COMPONENT_NAME,\n ATTR_OTEL_COMPONENT_TYPE,\n ATTR_SERVER_ADDRESS,\n ATTR_SERVER_PORT,\n} from './semconv';\nimport { VERSION } from './version';\n\nconst componentCounter = new Map<string, number>();\n\nexport interface ExporterMetricsOptions<Internal> {\n componentType: string;\n metricsHelper: IExporterMetricsHelper<Internal>;\n url: string | undefined;\n meterProvider: MeterProvider | undefined;\n responseAttributesFromError: (\n error: Error | string | undefined\n ) => Attributes;\n}\n\n/**\n * Generates `otel.sdk.exporter.*` metrics.\n * https://opentelemetry.io/docs/specs/semconv/otel/sdk-metrics\n */\nexport class ExporterMetrics<Internal> {\n private readonly inflight: UpDownCounter;\n private readonly exported: Counter;\n private readonly duration: Histogram;\n private readonly standardAttrs: Attributes;\n private readonly responseAttributesFromError: (\n error: Error | string | undefined\n ) => Attributes;\n\n private readonly helper: IExporterMetricsHelper<Internal>;\n\n constructor(options: ExporterMetricsOptions<Internal>) {\n const {\n componentType,\n metricsHelper,\n meterProvider,\n url,\n responseAttributesFromError,\n } = options;\n this.responseAttributesFromError = responseAttributesFromError;\n const meter = meterProvider\n ? meterProvider.getMeter('@opentelemetry/otlp-exporter', VERSION)\n : createNoopMeter();\n\n const counter = componentCounter.get(componentType) ?? 0;\n componentCounter.set(componentType, counter + 1);\n\n this.standardAttrs = {\n [ATTR_OTEL_COMPONENT_TYPE]: componentType,\n [ATTR_OTEL_COMPONENT_NAME]: `${componentType}/${counter}`,\n };\n if (url) {\n // URLs may exclude scheme for gRPC endpoints, but in this case they always\n // have a port number. Because the URL constructor requires a scheme, we\n // can still handle gRPC endpoints by prepending an arbitrary scheme.\n let urlToParse = url;\n if (!url.includes('://')) {\n urlToParse = `http://${url}`;\n }\n try {\n const parsedUrl = new URL(urlToParse);\n this.standardAttrs[ATTR_SERVER_ADDRESS] = parsedUrl.hostname;\n let port: number | undefined = undefined;\n if (parsedUrl.port) {\n port = Number(parsedUrl.port);\n } else if (parsedUrl.protocol === 'http:') {\n port = 80;\n } else if (parsedUrl.protocol === 'https:') {\n port = 443;\n }\n if (typeof port === 'number') {\n this.standardAttrs[ATTR_SERVER_PORT] = port;\n }\n } catch {\n // In practice, URLs will be valid or something else will break. Better to let that\n // inform the user than an exception in this internal code and proceed best-effort\n // here.\n }\n }\n\n this.helper = metricsHelper;\n\n this.inflight = meter.createUpDownCounter(\n `otel.sdk.exporter.${this.helper.name}.inflight`,\n {\n unit: `{${this.helper.name}}`,\n description: `The number of ${this.helper.name}s which were passed to the exporter, but that have not been exported yet (neither successful, nor failed).`,\n }\n );\n this.exported = meter.createCounter(\n `otel.sdk.exporter.${this.helper.name}.exported`,\n {\n unit: `{${this.helper.name}}`,\n description: `The number of ${this.helper.name}s for which the export has finished, either successful or failed.`,\n }\n );\n this.duration = meter.createHistogram(\n 'otel.sdk.exporter.operation.duration',\n {\n unit: 's',\n description: 'The duration of exporting a batch of telemetry records.',\n advice: {\n explicitBucketBoundaries: [],\n },\n }\n );\n }\n\n startExport(request: Internal): (error: Error | string | undefined) => void {\n const numItems = this.helper.countItems(request);\n const startTime = hrTime();\n this.inflight.add(numItems, this.standardAttrs);\n return (error: Error | string | undefined) => {\n const endTime = hrTime();\n this.inflight.add(-numItems, this.standardAttrs);\n const exportedAttrs = error\n ? {\n ...this.standardAttrs,\n [ATTR_ERROR_TYPE]:\n error instanceof Error ? error.name : 'export_failed',\n }\n : this.standardAttrs;\n this.exported.add(numItems, exportedAttrs);\n const durationAttrs = {\n ...exportedAttrs,\n ...this.responseAttributesFromError(error),\n };\n const duration =\n hrTimeToMilliseconds(hrTimeDuration(startTime, endTime)) / 1000;\n this.duration.record(duration, durationAttrs);\n };\n }\n}\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ExportResult } from '@opentelemetry/core';
|
|
2
|
-
import type { IOtlpExportDelegate } from './otlp-export-delegate';
|
|
3
|
-
import { type ExporterMetrics } from './ExporterMetrics';
|
|
4
|
-
export declare class OTLPExporterBase<Internal> {
|
|
5
|
-
private _delegate;
|
|
6
|
-
constructor(delegate: IOtlpExportDelegate<Internal>);
|
|
7
|
-
/**
|
|
8
|
-
* Export items.
|
|
9
|
-
* @param items
|
|
10
|
-
* @param resultCallback
|
|
11
|
-
*/
|
|
12
|
-
export(items: Internal, resultCallback: (result: ExportResult) => void): void;
|
|
13
|
-
forceFlush(): Promise<void>;
|
|
14
|
-
shutdown(): Promise<void>;
|
|
15
|
-
protected setMetrics(metrics: ExporterMetrics<Internal>): void;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=OTLPExporterBase.d.ts.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
export class OTLPExporterBase {
|
|
6
|
-
_delegate;
|
|
7
|
-
constructor(delegate) {
|
|
8
|
-
this._delegate = delegate;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Export items.
|
|
12
|
-
* @param items
|
|
13
|
-
* @param resultCallback
|
|
14
|
-
*/
|
|
15
|
-
export(items, resultCallback) {
|
|
16
|
-
this._delegate.export(items, resultCallback);
|
|
17
|
-
}
|
|
18
|
-
forceFlush() {
|
|
19
|
-
return this._delegate.forceFlush();
|
|
20
|
-
}
|
|
21
|
-
shutdown() {
|
|
22
|
-
return this._delegate.shutdown();
|
|
23
|
-
}
|
|
24
|
-
setMetrics(metrics) {
|
|
25
|
-
this._delegate.setMetrics(metrics);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=OTLPExporterBase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPExporterBase.js","sourceRoot":"","sources":["../../src/OTLPExporterBase.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,OAAO,gBAAgB;IACnB,SAAS,CAAgC;IACjD,YAAY,QAAuC;QACjD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,KAAe,EACf,cAA8C;QAE9C,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IAC/C,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;IACrC,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IACnC,CAAC;IAES,UAAU,CAAC,OAAkC;QACrD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { ExportResult } from '@opentelemetry/core';\nimport type { IOtlpExportDelegate } from './otlp-export-delegate';\nimport { type ExporterMetrics } from './ExporterMetrics';\n\nexport class OTLPExporterBase<Internal> {\n private _delegate: IOtlpExportDelegate<Internal>;\n constructor(delegate: IOtlpExportDelegate<Internal>) {\n this._delegate = delegate;\n }\n\n /**\n * Export items.\n * @param items\n * @param resultCallback\n */\n export(\n items: Internal,\n resultCallback: (result: ExportResult) => void\n ): void {\n this._delegate.export(items, resultCallback);\n }\n\n forceFlush(): Promise<void> {\n return this._delegate.forceFlush();\n }\n\n shutdown(): Promise<void> {\n return this._delegate.shutdown();\n }\n\n protected setMetrics(metrics: ExporterMetrics<Internal>) {\n this._delegate.setMetrics(metrics);\n }\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface IExportPromiseHandler {
|
|
2
|
-
pushPromise(promise: Promise<void>): void;
|
|
3
|
-
hasReachedLimit(): boolean;
|
|
4
|
-
awaitAll(): Promise<void>;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Promise queue for keeping track of export promises. Finished promises will be auto-dequeued.
|
|
8
|
-
* Allows for awaiting all promises in the queue.
|
|
9
|
-
*/
|
|
10
|
-
export declare function createBoundedQueueExportPromiseHandler(options: {
|
|
11
|
-
concurrencyLimit: number;
|
|
12
|
-
}): IExportPromiseHandler;
|
|
13
|
-
//# sourceMappingURL=bounded-queue-export-promise-handler.d.ts.map
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
class BoundedQueueExportPromiseHandler {
|
|
6
|
-
_concurrencyLimit;
|
|
7
|
-
_sendingPromises = [];
|
|
8
|
-
/**
|
|
9
|
-
* @param concurrencyLimit maximum promises allowed in a queue at the same time.
|
|
10
|
-
*/
|
|
11
|
-
constructor(concurrencyLimit) {
|
|
12
|
-
this._concurrencyLimit = concurrencyLimit;
|
|
13
|
-
}
|
|
14
|
-
pushPromise(promise) {
|
|
15
|
-
if (this.hasReachedLimit()) {
|
|
16
|
-
throw new Error('Concurrency Limit reached');
|
|
17
|
-
}
|
|
18
|
-
this._sendingPromises.push(promise);
|
|
19
|
-
const popPromise = () => {
|
|
20
|
-
const index = this._sendingPromises.indexOf(promise);
|
|
21
|
-
void this._sendingPromises.splice(index, 1);
|
|
22
|
-
};
|
|
23
|
-
promise.then(popPromise, popPromise);
|
|
24
|
-
}
|
|
25
|
-
hasReachedLimit() {
|
|
26
|
-
return this._sendingPromises.length >= this._concurrencyLimit;
|
|
27
|
-
}
|
|
28
|
-
async awaitAll() {
|
|
29
|
-
await Promise.all(this._sendingPromises);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Promise queue for keeping track of export promises. Finished promises will be auto-dequeued.
|
|
34
|
-
* Allows for awaiting all promises in the queue.
|
|
35
|
-
*/
|
|
36
|
-
export function createBoundedQueueExportPromiseHandler(options) {
|
|
37
|
-
return new BoundedQueueExportPromiseHandler(options.concurrencyLimit);
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=bounded-queue-export-promise-handler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bounded-queue-export-promise-handler.js","sourceRoot":"","sources":["../../src/bounded-queue-export-promise-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,MAAM,gCAAgC;IACnB,iBAAiB,CAAS;IACnC,gBAAgB,GAAuB,EAAE,CAAC;IAElD;;OAEG;IACH,YAAY,gBAAwB;QAClC,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;IAC5C,CAAC;IAEM,WAAW,CAAC,OAAsB;QACvC,IAAI,IAAI,CAAC,eAAe,EAAE,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAC9C;QAED,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,MAAM,UAAU,GAAG,GAAG,EAAE;YACtB,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACrD,KAAK,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC9C,CAAC,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACvC,CAAC;IAEM,eAAe;QACpB,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAAM,IAAI,IAAI,CAAC,iBAAiB,CAAC;IAChE,CAAC;IAEM,KAAK,CAAC,QAAQ;QACnB,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC3C,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,sCAAsC,CAAC,OAEtD;IACC,OAAO,IAAI,gCAAgC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACxE,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport interface IExportPromiseHandler {\n pushPromise(promise: Promise<void>): void;\n hasReachedLimit(): boolean;\n awaitAll(): Promise<void>;\n}\n\nclass BoundedQueueExportPromiseHandler implements IExportPromiseHandler {\n private readonly _concurrencyLimit: number;\n private _sendingPromises: Promise<unknown>[] = [];\n\n /**\n * @param concurrencyLimit maximum promises allowed in a queue at the same time.\n */\n constructor(concurrencyLimit: number) {\n this._concurrencyLimit = concurrencyLimit;\n }\n\n public pushPromise(promise: Promise<void>): void {\n if (this.hasReachedLimit()) {\n throw new Error('Concurrency Limit reached');\n }\n\n this._sendingPromises.push(promise);\n const popPromise = () => {\n const index = this._sendingPromises.indexOf(promise);\n void this._sendingPromises.splice(index, 1);\n };\n promise.then(popPromise, popPromise);\n }\n\n public hasReachedLimit(): boolean {\n return this._sendingPromises.length >= this._concurrencyLimit;\n }\n\n public async awaitAll(): Promise<void> {\n await Promise.all(this._sendingPromises);\n }\n}\n\n/**\n * Promise queue for keeping track of export promises. Finished promises will be auto-dequeued.\n * Allows for awaiting all promises in the queue.\n */\nexport function createBoundedQueueExportPromiseHandler(options: {\n concurrencyLimit: number;\n}): IExportPromiseHandler {\n return new BoundedQueueExportPromiseHandler(options.concurrencyLimit);\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { OtlpHttpConfiguration } from './otlp-http-configuration';
|
|
2
|
-
import type { OTLPExporterNodeConfigBase } from './legacy-node-configuration';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated this will be removed in 2.0
|
|
5
|
-
*
|
|
6
|
-
* @param config
|
|
7
|
-
* @param signalResourcePath
|
|
8
|
-
* @param requiredHeaders
|
|
9
|
-
*/
|
|
10
|
-
export declare function convertLegacyBrowserHttpOptions(config: OTLPExporterNodeConfigBase, signalResourcePath: string, requiredHeaders: Record<string, string>): OtlpHttpConfiguration;
|
|
11
|
-
//# sourceMappingURL=convert-legacy-browser-http-options.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getHttpConfigurationDefaults, mergeOtlpHttpConfigurationWithDefaults, } from './otlp-http-configuration';
|
|
2
|
-
import { convertLegacyHeaders } from './convert-legacy-http-options';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated this will be removed in 2.0
|
|
5
|
-
*
|
|
6
|
-
* @param config
|
|
7
|
-
* @param signalResourcePath
|
|
8
|
-
* @param requiredHeaders
|
|
9
|
-
*/
|
|
10
|
-
export function convertLegacyBrowserHttpOptions(config, signalResourcePath, requiredHeaders) {
|
|
11
|
-
return mergeOtlpHttpConfigurationWithDefaults({
|
|
12
|
-
url: config.url,
|
|
13
|
-
timeoutMillis: config.timeoutMillis,
|
|
14
|
-
headers: convertLegacyHeaders(config),
|
|
15
|
-
concurrencyLimit: config.concurrencyLimit,
|
|
16
|
-
}, {}, // no fallback for browser case
|
|
17
|
-
getHttpConfigurationDefaults(requiredHeaders, signalResourcePath));
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=convert-legacy-browser-http-options.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert-legacy-browser-http-options.js","sourceRoot":"","sources":["../../../src/configuration/convert-legacy-browser-http-options.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,4BAA4B,EAC5B,sCAAsC,GACvC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;;;;GAMG;AACH,MAAM,UAAU,+BAA+B,CAC7C,MAAkC,EAClC,kBAA0B,EAC1B,eAAuC;IAEvC,OAAO,sCAAsC,CAC3C;QACE,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC;QACrC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;KAC1C,EACD,EAAE,EAAE,+BAA+B;IACnC,4BAA4B,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAClE,CAAC;AACJ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nimport type { OtlpHttpConfiguration } from './otlp-http-configuration';\nimport {\n getHttpConfigurationDefaults,\n mergeOtlpHttpConfigurationWithDefaults,\n} from './otlp-http-configuration';\nimport type { OTLPExporterNodeConfigBase } from './legacy-node-configuration';\nimport { convertLegacyHeaders } from './convert-legacy-http-options';\n\n/**\n * @deprecated this will be removed in 2.0\n *\n * @param config\n * @param signalResourcePath\n * @param requiredHeaders\n */\nexport function convertLegacyBrowserHttpOptions(\n config: OTLPExporterNodeConfigBase,\n signalResourcePath: string,\n requiredHeaders: Record<string, string>\n): OtlpHttpConfiguration {\n return mergeOtlpHttpConfigurationWithDefaults(\n {\n url: config.url,\n timeoutMillis: config.timeoutMillis,\n headers: convertLegacyHeaders(config),\n concurrencyLimit: config.concurrencyLimit,\n },\n {}, // no fallback for browser case\n getHttpConfigurationDefaults(requiredHeaders, signalResourcePath)\n );\n}\n"]}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { OTLPExporterConfigBase } from './legacy-base-configuration';
|
|
2
|
-
import type { HeadersFactory } from './otlp-http-configuration';
|
|
3
|
-
export declare function convertLegacyHeaders(config: OTLPExporterConfigBase): HeadersFactory | undefined;
|
|
4
|
-
//# sourceMappingURL=convert-legacy-http-options.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { wrapStaticHeadersInFunction } from './shared-configuration';
|
|
6
|
-
export function convertLegacyHeaders(config) {
|
|
7
|
-
if (typeof config.headers === 'function') {
|
|
8
|
-
return config.headers;
|
|
9
|
-
}
|
|
10
|
-
return wrapStaticHeadersInFunction(config.headers);
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=convert-legacy-http-options.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert-legacy-http-options.js","sourceRoot":"","sources":["../../../src/configuration/convert-legacy-http-options.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAGrE,MAAM,UAAU,oBAAoB,CAClC,MAA8B;IAE9B,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,UAAU,EAAE;QACxC,OAAO,MAAM,CAAC,OAAO,CAAC;KACvB;IACD,OAAO,2BAA2B,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrD,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { OTLPExporterConfigBase } from './legacy-base-configuration';\nimport { wrapStaticHeadersInFunction } from './shared-configuration';\nimport type { HeadersFactory } from './otlp-http-configuration';\n\nexport function convertLegacyHeaders(\n config: OTLPExporterConfigBase\n): HeadersFactory | undefined {\n if (typeof config.headers === 'function') {\n return config.headers;\n }\n return wrapStaticHeadersInFunction(config.headers);\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { OTLPExporterNodeConfigBase } from './legacy-node-configuration';
|
|
2
|
-
import type { OtlpNodeHttpConfiguration } from './otlp-node-http-configuration';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated this will be removed in 2.0
|
|
5
|
-
* @param config
|
|
6
|
-
* @param signalIdentifier
|
|
7
|
-
* @param signalResourcePath
|
|
8
|
-
* @param requiredHeaders
|
|
9
|
-
*/
|
|
10
|
-
export declare function convertLegacyHttpOptions(config: OTLPExporterNodeConfigBase, signalIdentifier: string, signalResourcePath: string, requiredHeaders: Record<string, string>): OtlpNodeHttpConfiguration;
|
|
11
|
-
//# sourceMappingURL=convert-legacy-node-http-options.d.ts.map
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { diag } from '@opentelemetry/api';
|
|
2
|
-
import { getNodeHttpConfigurationDefaults, mergeOtlpNodeHttpConfigurationWithDefaults, } from './otlp-node-http-configuration';
|
|
3
|
-
import { httpAgentFactoryFromOptions } from '../index-node-http';
|
|
4
|
-
import { getNodeHttpConfigurationFromEnvironment } from './otlp-node-http-env-configuration';
|
|
5
|
-
import { convertLegacyHeaders } from './convert-legacy-http-options';
|
|
6
|
-
function convertLegacyAgentOptions(config) {
|
|
7
|
-
if (typeof config.httpAgentOptions === 'function') {
|
|
8
|
-
return config.httpAgentOptions;
|
|
9
|
-
}
|
|
10
|
-
let legacy = config.httpAgentOptions;
|
|
11
|
-
if (config.keepAlive != null) {
|
|
12
|
-
legacy = { keepAlive: config.keepAlive, ...legacy };
|
|
13
|
-
}
|
|
14
|
-
if (legacy != null) {
|
|
15
|
-
return httpAgentFactoryFromOptions(legacy);
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
return undefined;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated this will be removed in 2.0
|
|
23
|
-
* @param config
|
|
24
|
-
* @param signalIdentifier
|
|
25
|
-
* @param signalResourcePath
|
|
26
|
-
* @param requiredHeaders
|
|
27
|
-
*/
|
|
28
|
-
export function convertLegacyHttpOptions(config, signalIdentifier, signalResourcePath, requiredHeaders) {
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
|
-
if (config.metadata) {
|
|
31
|
-
diag.warn('Metadata cannot be set when using http');
|
|
32
|
-
}
|
|
33
|
-
return mergeOtlpNodeHttpConfigurationWithDefaults({
|
|
34
|
-
url: config.url,
|
|
35
|
-
headers: convertLegacyHeaders(config),
|
|
36
|
-
concurrencyLimit: config.concurrencyLimit,
|
|
37
|
-
timeoutMillis: config.timeoutMillis,
|
|
38
|
-
compression: config.compression,
|
|
39
|
-
agentFactory: convertLegacyAgentOptions(config),
|
|
40
|
-
userAgent: config.userAgent,
|
|
41
|
-
}, getNodeHttpConfigurationFromEnvironment(signalIdentifier, signalResourcePath), getNodeHttpConfigurationDefaults(requiredHeaders, signalResourcePath));
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=convert-legacy-node-http-options.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert-legacy-node-http-options.js","sourceRoot":"","sources":["../../../src/configuration/convert-legacy-node-http-options.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAK1C,OAAO,EACL,gCAAgC,EAChC,0CAA0C,GAC3C,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,uCAAuC,EAAE,MAAM,oCAAoC,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,SAAS,yBAAyB,CAChC,MAAkC;IAElC,IAAI,OAAO,MAAM,CAAC,gBAAgB,KAAK,UAAU,EAAE;QACjD,OAAO,MAAM,CAAC,gBAAgB,CAAC;KAChC;IAED,IAAI,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACrC,IAAI,MAAM,CAAC,SAAS,IAAI,IAAI,EAAE;QAC5B,MAAM,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,GAAG,MAAM,EAAE,CAAC;KACrD;IAED,IAAI,MAAM,IAAI,IAAI,EAAE;QAClB,OAAO,2BAA2B,CAAC,MAAM,CAAC,CAAC;KAC5C;SAAM;QACL,OAAO,SAAS,CAAC;KAClB;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAAkC,EAClC,gBAAwB,EACxB,kBAA0B,EAC1B,eAAuC;IAEvC,8DAA8D;IAC9D,IAAK,MAAc,CAAC,QAAQ,EAAE;QAC5B,IAAI,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;KACrD;IAED,OAAO,0CAA0C,CAC/C;QACE,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC;QACrC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;QACzC,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,YAAY,EAAE,yBAAyB,CAAC,MAAM,CAAC;QAC/C,SAAS,EAAE,MAAM,CAAC,SAAS;KAC5B,EACD,uCAAuC,CACrC,gBAAgB,EAChB,kBAAkB,CACnB,EACD,gCAAgC,CAAC,eAAe,EAAE,kBAAkB,CAAC,CACtE,CAAC;AACJ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nimport type { OTLPExporterNodeConfigBase } from './legacy-node-configuration';\nimport { diag } from '@opentelemetry/api';\nimport type {\n HttpAgentFactory,\n OtlpNodeHttpConfiguration,\n} from './otlp-node-http-configuration';\nimport {\n getNodeHttpConfigurationDefaults,\n mergeOtlpNodeHttpConfigurationWithDefaults,\n} from './otlp-node-http-configuration';\nimport { httpAgentFactoryFromOptions } from '../index-node-http';\nimport { getNodeHttpConfigurationFromEnvironment } from './otlp-node-http-env-configuration';\nimport { convertLegacyHeaders } from './convert-legacy-http-options';\n\nfunction convertLegacyAgentOptions(\n config: OTLPExporterNodeConfigBase\n): HttpAgentFactory | undefined {\n if (typeof config.httpAgentOptions === 'function') {\n return config.httpAgentOptions;\n }\n\n let legacy = config.httpAgentOptions;\n if (config.keepAlive != null) {\n legacy = { keepAlive: config.keepAlive, ...legacy };\n }\n\n if (legacy != null) {\n return httpAgentFactoryFromOptions(legacy);\n } else {\n return undefined;\n }\n}\n\n/**\n * @deprecated this will be removed in 2.0\n * @param config\n * @param signalIdentifier\n * @param signalResourcePath\n * @param requiredHeaders\n */\nexport function convertLegacyHttpOptions(\n config: OTLPExporterNodeConfigBase,\n signalIdentifier: string,\n signalResourcePath: string,\n requiredHeaders: Record<string, string>\n): OtlpNodeHttpConfiguration {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((config as any).metadata) {\n diag.warn('Metadata cannot be set when using http');\n }\n\n return mergeOtlpNodeHttpConfigurationWithDefaults(\n {\n url: config.url,\n headers: convertLegacyHeaders(config),\n concurrencyLimit: config.concurrencyLimit,\n timeoutMillis: config.timeoutMillis,\n compression: config.compression,\n agentFactory: convertLegacyAgentOptions(config),\n userAgent: config.userAgent,\n },\n getNodeHttpConfigurationFromEnvironment(\n signalIdentifier,\n signalResourcePath\n ),\n getNodeHttpConfigurationDefaults(requiredHeaders, signalResourcePath)\n );\n}\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { MeterProvider } from '@opentelemetry/api';
|
|
2
|
-
import type { IExporterMetricsHelper, ISerializer } from '@opentelemetry/otlp-transformer';
|
|
3
|
-
import type { IOtlpExportDelegate } from '../otlp-export-delegate';
|
|
4
|
-
import type { OTLPExporterConfigBase } from './legacy-base-configuration';
|
|
5
|
-
import { ExporterMetrics } from '../ExporterMetrics';
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated
|
|
8
|
-
*/
|
|
9
|
-
export declare function createLegacyOtlpBrowserExporterMetrics<Internal>(metricsComponentType: string, exporterMetricsHelper: IExporterMetricsHelper<Internal>, url: string | undefined, meterProvider: MeterProvider | undefined): ExporterMetrics<Internal>;
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated
|
|
12
|
-
* @param config
|
|
13
|
-
* @param serializer
|
|
14
|
-
* @param signalResourcePath
|
|
15
|
-
* @param requiredHeaders
|
|
16
|
-
*/
|
|
17
|
-
export declare function createLegacyOtlpBrowserExportDelegate<Internal, Response>(config: OTLPExporterConfigBase, serializer: ISerializer<Internal, Response>, metricsComponentType: string, exporterMetricsHelper: IExporterMetricsHelper<Internal>, meterProvider: MeterProvider | undefined, signalResourcePath: string, requiredHeaders: Record<string, string>): IOtlpExportDelegate<Internal>;
|
|
18
|
-
//# sourceMappingURL=create-legacy-browser-delegate.d.ts.map
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { createOtlpFetchExportDelegate } from '../otlp-browser-http-export-delegate';
|
|
6
|
-
import { convertLegacyBrowserHttpOptions } from './convert-legacy-browser-http-options';
|
|
7
|
-
import { ATTR_HTTP_RESPONSE_STATUS_CODE } from '../semconv';
|
|
8
|
-
import { ExporterMetrics } from '../ExporterMetrics';
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated
|
|
11
|
-
*/
|
|
12
|
-
export function createLegacyOtlpBrowserExporterMetrics(metricsComponentType, exporterMetricsHelper, url, meterProvider) {
|
|
13
|
-
return new ExporterMetrics({
|
|
14
|
-
componentType: metricsComponentType,
|
|
15
|
-
metricsHelper: exporterMetricsHelper,
|
|
16
|
-
url,
|
|
17
|
-
meterProvider,
|
|
18
|
-
responseAttributesFromError: (error) => {
|
|
19
|
-
if (!error) {
|
|
20
|
-
return {
|
|
21
|
-
[ATTR_HTTP_RESPONSE_STATUS_CODE]: 200,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
if (!(error instanceof Error)) {
|
|
25
|
-
return {};
|
|
26
|
-
}
|
|
27
|
-
if (error.message.startsWith('Fetch request failed with non-retryable status ')) {
|
|
28
|
-
const statusStr = error.message.substring('Fetch request failed with non-retryable status '.length);
|
|
29
|
-
return {
|
|
30
|
-
[ATTR_HTTP_RESPONSE_STATUS_CODE]: Number(statusStr),
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
return {};
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* @deprecated
|
|
39
|
-
* @param config
|
|
40
|
-
* @param serializer
|
|
41
|
-
* @param signalResourcePath
|
|
42
|
-
* @param requiredHeaders
|
|
43
|
-
*/
|
|
44
|
-
export function createLegacyOtlpBrowserExportDelegate(config, serializer, metricsComponentType, exporterMetricsHelper, meterProvider, signalResourcePath, requiredHeaders) {
|
|
45
|
-
const options = convertLegacyBrowserHttpOptions(config, signalResourcePath, requiredHeaders);
|
|
46
|
-
return createOtlpFetchExportDelegate(options, serializer, createLegacyOtlpBrowserExporterMetrics(metricsComponentType, exporterMetricsHelper, options.url, config.selfObsMeterProvider));
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=create-legacy-browser-delegate.js.map
|