@opentelemetry/otlp-exporter-base 0.222.0 → 0.300.0-development.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +143 -0
- package/dist/transport/fetch-transport.cjs.map +1 -0
- package/dist/transport/fetch-transport.mjs +143 -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 +41 -38
- 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
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).
|
|
3
|
-
*
|
|
4
|
-
* @example 200
|
|
5
|
-
*/
|
|
6
|
-
export declare const ATTR_HTTP_RESPONSE_STATUS_CODE: "http.response.status_code";
|
|
7
|
-
/**
|
|
8
|
-
* A name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
|
|
9
|
-
*
|
|
10
|
-
* @example otlp_grpc_span_exporter/0
|
|
11
|
-
* @example custom-name
|
|
12
|
-
*
|
|
13
|
-
* @note Implementations **SHOULD** ensure a low cardinality for this attribute, even across application or SDK restarts.
|
|
14
|
-
* E.g. implementations **MUST NOT** use UUIDs as values for this attribute.
|
|
15
|
-
*
|
|
16
|
-
* Implementations **MAY** achieve these goals by following a `<otel.component.type>/<instance-counter>` pattern, e.g. `batching_span_processor/0`.
|
|
17
|
-
* Hereby `otel.component.type` refers to the corresponding attribute value of the component.
|
|
18
|
-
*
|
|
19
|
-
* The value of `instance-counter` **MAY** be automatically assigned by the component and uniqueness within the enclosing SDK instance **MUST** be guaranteed.
|
|
20
|
-
* For example, `<instance-counter>` **MAY** be implemented by using a monotonically increasing counter (starting with `0`), which is incremented every time an
|
|
21
|
-
* instance of the given component type is started.
|
|
22
|
-
*
|
|
23
|
-
* With this implementation, for example the first Batching Span Processor would have `batching_span_processor/0`
|
|
24
|
-
* as `otel.component.name`, the second one `batching_span_processor/1` and so on.
|
|
25
|
-
* These values will therefore be reused in the case of an application restart.
|
|
26
|
-
*
|
|
27
|
-
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
28
|
-
*/
|
|
29
|
-
export declare const ATTR_OTEL_COMPONENT_NAME: "otel.component.name";
|
|
30
|
-
/**
|
|
31
|
-
* A name identifying the type of the OpenTelemetry component.
|
|
32
|
-
*
|
|
33
|
-
* @example batching_span_processor
|
|
34
|
-
* @example com.example.MySpanExporter
|
|
35
|
-
*
|
|
36
|
-
* @note If none of the standardized values apply, implementations **SHOULD** use the language-defined name of the type.
|
|
37
|
-
* E.g. for Java the fully qualified classname **SHOULD** be used in this case.
|
|
38
|
-
*
|
|
39
|
-
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
40
|
-
*/
|
|
41
|
-
export declare const ATTR_OTEL_COMPONENT_TYPE: "otel.component.type";
|
|
42
|
-
/**
|
|
43
|
-
* Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
|
|
44
|
-
*
|
|
45
|
-
* @example example.com
|
|
46
|
-
* @example 10.1.2.80
|
|
47
|
-
* @example /tmp/my.sock
|
|
48
|
-
*
|
|
49
|
-
* @note When observed from the client side, and when communicating through an intermediary, `server.address` **SHOULD** represent the server address behind any intermediaries, for example proxies, if it's available.
|
|
50
|
-
*/
|
|
51
|
-
export declare const ATTR_SERVER_ADDRESS: "server.address";
|
|
52
|
-
/**
|
|
53
|
-
* Server port number.
|
|
54
|
-
*
|
|
55
|
-
* @example 80
|
|
56
|
-
* @example 8080
|
|
57
|
-
* @example 443
|
|
58
|
-
*
|
|
59
|
-
* @note When observed from the client side, and when communicating through an intermediary, `server.port` **SHOULD** represent the server port behind any intermediaries, for example proxies, if it's available.
|
|
60
|
-
*/
|
|
61
|
-
export declare const ATTR_SERVER_PORT: "server.port";
|
|
62
|
-
/**
|
|
63
|
-
* Describes a class of error the operation ended with.
|
|
64
|
-
*
|
|
65
|
-
* @example timeout
|
|
66
|
-
* @example java.net.UnknownHostException
|
|
67
|
-
* @example server_certificate_invalid
|
|
68
|
-
* @example 500
|
|
69
|
-
*
|
|
70
|
-
* @note The `error.type` **SHOULD** be predictable, and **SHOULD** have low cardinality.
|
|
71
|
-
*
|
|
72
|
-
* When `error.type` is set to a type (e.g., an exception type), its
|
|
73
|
-
* canonical class name identifying the type within the artifact **SHOULD** be used.
|
|
74
|
-
*
|
|
75
|
-
* Instrumentations **SHOULD** document the list of errors they report.
|
|
76
|
-
*
|
|
77
|
-
* The cardinality of `error.type` within one instrumentation library **SHOULD** be low.
|
|
78
|
-
* Telemetry consumers that aggregate data from multiple instrumentation libraries and applications
|
|
79
|
-
* should be prepared for `error.type` to have high cardinality at query time when no
|
|
80
|
-
* additional filters are applied.
|
|
81
|
-
*
|
|
82
|
-
* If the operation has completed successfully, instrumentations **SHOULD NOT** set `error.type`.
|
|
83
|
-
*
|
|
84
|
-
* If a specific domain defines its own set of error identifiers (such as HTTP or RPC status codes),
|
|
85
|
-
* it's **RECOMMENDED** to:
|
|
86
|
-
*
|
|
87
|
-
* - Use a domain-specific attribute
|
|
88
|
-
* - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
|
|
89
|
-
*/
|
|
90
|
-
export declare const ATTR_ERROR_TYPE: "error.type";
|
|
91
|
-
//# sourceMappingURL=semconv.d.ts.map
|
package/build/esnext/semconv.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
/*
|
|
6
|
-
* This file contains a copy of unstable semantic convention definitions
|
|
7
|
-
* used by this package.
|
|
8
|
-
* @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).
|
|
12
|
-
*
|
|
13
|
-
* @example 200
|
|
14
|
-
*/
|
|
15
|
-
export const ATTR_HTTP_RESPONSE_STATUS_CODE = 'http.response.status_code';
|
|
16
|
-
/**
|
|
17
|
-
* A name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
|
|
18
|
-
*
|
|
19
|
-
* @example otlp_grpc_span_exporter/0
|
|
20
|
-
* @example custom-name
|
|
21
|
-
*
|
|
22
|
-
* @note Implementations **SHOULD** ensure a low cardinality for this attribute, even across application or SDK restarts.
|
|
23
|
-
* E.g. implementations **MUST NOT** use UUIDs as values for this attribute.
|
|
24
|
-
*
|
|
25
|
-
* Implementations **MAY** achieve these goals by following a `<otel.component.type>/<instance-counter>` pattern, e.g. `batching_span_processor/0`.
|
|
26
|
-
* Hereby `otel.component.type` refers to the corresponding attribute value of the component.
|
|
27
|
-
*
|
|
28
|
-
* The value of `instance-counter` **MAY** be automatically assigned by the component and uniqueness within the enclosing SDK instance **MUST** be guaranteed.
|
|
29
|
-
* For example, `<instance-counter>` **MAY** be implemented by using a monotonically increasing counter (starting with `0`), which is incremented every time an
|
|
30
|
-
* instance of the given component type is started.
|
|
31
|
-
*
|
|
32
|
-
* With this implementation, for example the first Batching Span Processor would have `batching_span_processor/0`
|
|
33
|
-
* as `otel.component.name`, the second one `batching_span_processor/1` and so on.
|
|
34
|
-
* These values will therefore be reused in the case of an application restart.
|
|
35
|
-
*
|
|
36
|
-
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
37
|
-
*/
|
|
38
|
-
export const ATTR_OTEL_COMPONENT_NAME = 'otel.component.name';
|
|
39
|
-
/**
|
|
40
|
-
* A name identifying the type of the OpenTelemetry component.
|
|
41
|
-
*
|
|
42
|
-
* @example batching_span_processor
|
|
43
|
-
* @example com.example.MySpanExporter
|
|
44
|
-
*
|
|
45
|
-
* @note If none of the standardized values apply, implementations **SHOULD** use the language-defined name of the type.
|
|
46
|
-
* E.g. for Java the fully qualified classname **SHOULD** be used in this case.
|
|
47
|
-
*
|
|
48
|
-
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
49
|
-
*/
|
|
50
|
-
export const ATTR_OTEL_COMPONENT_TYPE = 'otel.component.type';
|
|
51
|
-
/**
|
|
52
|
-
* Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
|
|
53
|
-
*
|
|
54
|
-
* @example example.com
|
|
55
|
-
* @example 10.1.2.80
|
|
56
|
-
* @example /tmp/my.sock
|
|
57
|
-
*
|
|
58
|
-
* @note When observed from the client side, and when communicating through an intermediary, `server.address` **SHOULD** represent the server address behind any intermediaries, for example proxies, if it's available.
|
|
59
|
-
*/
|
|
60
|
-
export const ATTR_SERVER_ADDRESS = 'server.address';
|
|
61
|
-
/**
|
|
62
|
-
* Server port number.
|
|
63
|
-
*
|
|
64
|
-
* @example 80
|
|
65
|
-
* @example 8080
|
|
66
|
-
* @example 443
|
|
67
|
-
*
|
|
68
|
-
* @note When observed from the client side, and when communicating through an intermediary, `server.port` **SHOULD** represent the server port behind any intermediaries, for example proxies, if it's available.
|
|
69
|
-
*/
|
|
70
|
-
export const ATTR_SERVER_PORT = 'server.port';
|
|
71
|
-
/**
|
|
72
|
-
* Describes a class of error the operation ended with.
|
|
73
|
-
*
|
|
74
|
-
* @example timeout
|
|
75
|
-
* @example java.net.UnknownHostException
|
|
76
|
-
* @example server_certificate_invalid
|
|
77
|
-
* @example 500
|
|
78
|
-
*
|
|
79
|
-
* @note The `error.type` **SHOULD** be predictable, and **SHOULD** have low cardinality.
|
|
80
|
-
*
|
|
81
|
-
* When `error.type` is set to a type (e.g., an exception type), its
|
|
82
|
-
* canonical class name identifying the type within the artifact **SHOULD** be used.
|
|
83
|
-
*
|
|
84
|
-
* Instrumentations **SHOULD** document the list of errors they report.
|
|
85
|
-
*
|
|
86
|
-
* The cardinality of `error.type` within one instrumentation library **SHOULD** be low.
|
|
87
|
-
* Telemetry consumers that aggregate data from multiple instrumentation libraries and applications
|
|
88
|
-
* should be prepared for `error.type` to have high cardinality at query time when no
|
|
89
|
-
* additional filters are applied.
|
|
90
|
-
*
|
|
91
|
-
* If the operation has completed successfully, instrumentations **SHOULD NOT** set `error.type`.
|
|
92
|
-
*
|
|
93
|
-
* If a specific domain defines its own set of error identifiers (such as HTTP or RPC status codes),
|
|
94
|
-
* it's **RECOMMENDED** to:
|
|
95
|
-
*
|
|
96
|
-
* - Use a domain-specific attribute
|
|
97
|
-
* - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
|
|
98
|
-
*/
|
|
99
|
-
export const ATTR_ERROR_TYPE = 'error.type';
|
|
100
|
-
//# sourceMappingURL=semconv.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semconv.js","sourceRoot":"","sources":["../../src/semconv.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GACzC,2BAAoC,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,qBAA8B,CAAC;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,qBAA8B,CAAC;AAEvE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAyB,CAAC;AAE7D;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAsB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,YAAqB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n/**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n *\n * @example 200\n */\nexport const ATTR_HTTP_RESPONSE_STATUS_CODE =\n 'http.response.status_code' as const;\n\n/**\n * A name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.\n *\n * @example otlp_grpc_span_exporter/0\n * @example custom-name\n *\n * @note Implementations **SHOULD** ensure a low cardinality for this attribute, even across application or SDK restarts.\n * E.g. implementations **MUST NOT** use UUIDs as values for this attribute.\n *\n * Implementations **MAY** achieve these goals by following a `<otel.component.type>/<instance-counter>` pattern, e.g. `batching_span_processor/0`.\n * Hereby `otel.component.type` refers to the corresponding attribute value of the component.\n *\n * The value of `instance-counter` **MAY** be automatically assigned by the component and uniqueness within the enclosing SDK instance **MUST** be guaranteed.\n * For example, `<instance-counter>` **MAY** be implemented by using a monotonically increasing counter (starting with `0`), which is incremented every time an\n * instance of the given component type is started.\n *\n * With this implementation, for example the first Batching Span Processor would have `batching_span_processor/0`\n * as `otel.component.name`, the second one `batching_span_processor/1` and so on.\n * These values will therefore be reused in the case of an application restart.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_OTEL_COMPONENT_NAME = 'otel.component.name' as const;\n\n/**\n * A name identifying the type of the OpenTelemetry component.\n *\n * @example batching_span_processor\n * @example com.example.MySpanExporter\n *\n * @note If none of the standardized values apply, implementations **SHOULD** use the language-defined name of the type.\n * E.g. for Java the fully qualified classname **SHOULD** be used in this case.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_OTEL_COMPONENT_TYPE = 'otel.component.type' as const;\n\n/**\n * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\n *\n * @example example.com\n * @example 10.1.2.80\n * @example /tmp/my.sock\n *\n * @note When observed from the client side, and when communicating through an intermediary, `server.address` **SHOULD** represent the server address behind any intermediaries, for example proxies, if it's available.\n */\nexport const ATTR_SERVER_ADDRESS = 'server.address' as const;\n\n/**\n * Server port number.\n *\n * @example 80\n * @example 8080\n * @example 443\n *\n * @note When observed from the client side, and when communicating through an intermediary, `server.port` **SHOULD** represent the server port behind any intermediaries, for example proxies, if it's available.\n */\nexport const ATTR_SERVER_PORT = 'server.port' as const;\n\n/**\n * Describes a class of error the operation ended with.\n *\n * @example timeout\n * @example java.net.UnknownHostException\n * @example server_certificate_invalid\n * @example 500\n *\n * @note The `error.type` **SHOULD** be predictable, and **SHOULD** have low cardinality.\n *\n * When `error.type` is set to a type (e.g., an exception type), its\n * canonical class name identifying the type within the artifact **SHOULD** be used.\n *\n * Instrumentations **SHOULD** document the list of errors they report.\n *\n * The cardinality of `error.type` within one instrumentation library **SHOULD** be low.\n * Telemetry consumers that aggregate data from multiple instrumentation libraries and applications\n * should be prepared for `error.type` to have high cardinality at query time when no\n * additional filters are applied.\n *\n * If the operation has completed successfully, instrumentations **SHOULD NOT** set `error.type`.\n *\n * If a specific domain defines its own set of error identifiers (such as HTTP or RPC status codes),\n * it's **RECOMMENDED** to:\n *\n * - Use a domain-specific attribute\n * - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.\n */\nexport const ATTR_ERROR_TYPE = 'error.type' as const;\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { IExporterTransport } from '../exporter-transport';
|
|
2
|
-
import type { HeadersFactory } from '../configuration/otlp-http-configuration';
|
|
3
|
-
export interface FetchTransportParameters {
|
|
4
|
-
url: string;
|
|
5
|
-
headers: HeadersFactory;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Creates an exporter transport that uses `fetch` to send the data
|
|
9
|
-
* @param parameters applied to each request made by transport
|
|
10
|
-
*/
|
|
11
|
-
export declare function createFetchTransport(parameters: FetchTransportParameters): IExporterTransport;
|
|
12
|
-
//# sourceMappingURL=fetch-transport.d.ts.map
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { diag } from '@opentelemetry/api';
|
|
6
|
-
import { isExportHTTPErrorRetryable, parseRetryAfterToMills, } from '../is-export-retryable';
|
|
7
|
-
/**
|
|
8
|
-
* Maximum total body size for concurrent keepalive requests.
|
|
9
|
-
* Browsers enforce a 64KiB cumulative limit across all pending keepalive requests.
|
|
10
|
-
* We use 60KB to leave headroom for headers.
|
|
11
|
-
* @see https://github.com/whatwg/fetch/issues/679
|
|
12
|
-
* @see https://blog.huli.tw/2025/01/06/en/navigator-sendbeacon-64kib-and-source-code/
|
|
13
|
-
*/
|
|
14
|
-
const MAX_KEEPALIVE_BODY_SIZE = 60 * 1024;
|
|
15
|
-
/**
|
|
16
|
-
* Maximum concurrent keepalive requests.
|
|
17
|
-
* Chrome enforces 9 concurrent keepalive fetch requests per renderer process.
|
|
18
|
-
* @see https://github.com/whatwg/fetch/issues/679
|
|
19
|
-
* Quote: "If the renderer process is processing more than 9 requests with keepalive set, we reject a new request"
|
|
20
|
-
*/
|
|
21
|
-
const MAX_KEEPALIVE_REQUESTS = 9;
|
|
22
|
-
/**
|
|
23
|
-
* Track cumulative pending body size across all in-flight keepalive requests.
|
|
24
|
-
* This is necessary because the 64KiB limit is cumulative, not per-request.
|
|
25
|
-
*/
|
|
26
|
-
let pendingBodySize = 0;
|
|
27
|
-
/**
|
|
28
|
-
* Track number of pending keepalive requests.
|
|
29
|
-
*/
|
|
30
|
-
let pendingKeepaliveCount = 0;
|
|
31
|
-
class FetchTransport {
|
|
32
|
-
_parameters;
|
|
33
|
-
constructor(parameters) {
|
|
34
|
-
this._parameters = parameters;
|
|
35
|
-
}
|
|
36
|
-
async send(data, timeoutMillis) {
|
|
37
|
-
const abortController = new AbortController();
|
|
38
|
-
const timeout = setTimeout(() => abortController.abort(), timeoutMillis);
|
|
39
|
-
// Fetch API may be wrapped by an instrumentation like `@opentelemetry/instrumentation-fetch`.
|
|
40
|
-
// In that case the instrumentation would create a new Span for this request
|
|
41
|
-
// because the context manager cannot keep the context after `await` calls.
|
|
42
|
-
// This creates an indirect endless loop Export -> Span -> Export
|
|
43
|
-
// By using the `__original` function the instrumentation can't intercept the call
|
|
44
|
-
// and no Span will be created breaking the vicious cycle
|
|
45
|
-
let fetchApi = globalThis.fetch;
|
|
46
|
-
// @ts-expect-error -- fetch could be wrapped
|
|
47
|
-
if (typeof fetchApi.__original === 'function') {
|
|
48
|
-
// @ts-expect-error -- fetch could be wrapped
|
|
49
|
-
fetchApi = fetchApi.__original;
|
|
50
|
-
}
|
|
51
|
-
const requestSize = data.byteLength;
|
|
52
|
-
// Determine if we can use keepalive based on cumulative browser limits.
|
|
53
|
-
// We must check BEFORE adding to pending totals to avoid exceeding limits.
|
|
54
|
-
const wouldExceedSize = pendingBodySize + requestSize > MAX_KEEPALIVE_BODY_SIZE;
|
|
55
|
-
const wouldExceedCount = pendingKeepaliveCount >= MAX_KEEPALIVE_REQUESTS;
|
|
56
|
-
const useKeepalive = !wouldExceedSize && !wouldExceedCount;
|
|
57
|
-
if (useKeepalive) {
|
|
58
|
-
pendingBodySize += requestSize;
|
|
59
|
-
pendingKeepaliveCount++;
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
const reason = wouldExceedSize ? 'size limit' : 'count limit';
|
|
63
|
-
diag.debug(`keepalive disabled: ${(requestSize / 1024).toFixed(1)}KB payload, ${pendingKeepaliveCount} pending (${reason})`);
|
|
64
|
-
}
|
|
65
|
-
try {
|
|
66
|
-
const url = new URL(this._parameters.url);
|
|
67
|
-
const response = await fetchApi(url.href, {
|
|
68
|
-
method: 'POST',
|
|
69
|
-
headers: await this._parameters.headers(),
|
|
70
|
-
body: data,
|
|
71
|
-
signal: abortController.signal,
|
|
72
|
-
keepalive: useKeepalive,
|
|
73
|
-
mode: globalThis.location
|
|
74
|
-
? globalThis.location.origin === url.origin
|
|
75
|
-
? 'same-origin'
|
|
76
|
-
: 'cors'
|
|
77
|
-
: 'no-cors',
|
|
78
|
-
});
|
|
79
|
-
if (response.status >= 200 && response.status <= 299) {
|
|
80
|
-
diag.debug(`export response success (status: ${response.status})`);
|
|
81
|
-
return { status: 'success' };
|
|
82
|
-
}
|
|
83
|
-
else if (isExportHTTPErrorRetryable(response.status)) {
|
|
84
|
-
diag.warn(`export response retryable (status: ${response.status})`);
|
|
85
|
-
const retryAfter = response.headers.get('Retry-After');
|
|
86
|
-
const retryInMillis = parseRetryAfterToMills(retryAfter);
|
|
87
|
-
return { status: 'retryable', retryInMillis };
|
|
88
|
-
}
|
|
89
|
-
diag.error(`export response failure (status: ${response.status})`);
|
|
90
|
-
return {
|
|
91
|
-
status: 'failure',
|
|
92
|
-
error: new Error(`Fetch request failed with non-retryable status ${response.status}`),
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
catch (error) {
|
|
96
|
-
if (isFetchNetworkErrorRetryable(error)) {
|
|
97
|
-
diag.warn(`export request retryable (network error: ${error})`);
|
|
98
|
-
return {
|
|
99
|
-
status: 'retryable',
|
|
100
|
-
error: new Error('Fetch request encountered a network error', {
|
|
101
|
-
cause: error,
|
|
102
|
-
}),
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
diag.error(`export request failure (error: ${error})`);
|
|
106
|
-
return {
|
|
107
|
-
status: 'failure',
|
|
108
|
-
error: new Error('Fetch request errored', { cause: error }),
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
finally {
|
|
112
|
-
clearTimeout(timeout);
|
|
113
|
-
if (useKeepalive) {
|
|
114
|
-
pendingBodySize -= requestSize;
|
|
115
|
-
pendingKeepaliveCount--;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
shutdown() {
|
|
120
|
-
// Intentionally left empty, nothing to do.
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Creates an exporter transport that uses `fetch` to send the data
|
|
125
|
-
* @param parameters applied to each request made by transport
|
|
126
|
-
*/
|
|
127
|
-
export function createFetchTransport(parameters) {
|
|
128
|
-
return new FetchTransport(parameters);
|
|
129
|
-
}
|
|
130
|
-
function isFetchNetworkErrorRetryable(error) {
|
|
131
|
-
return error instanceof TypeError && !error.cause;
|
|
132
|
-
}
|
|
133
|
-
//# sourceMappingURL=fetch-transport.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-transport.js","sourceRoot":"","sources":["../../../src/transport/fetch-transport.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { IExporterTransport } from '../exporter-transport';\nimport type { ExportResponse } from '../export-response';\nimport { diag } from '@opentelemetry/api';\nimport {\n isExportHTTPErrorRetryable,\n parseRetryAfterToMills,\n} from '../is-export-retryable';\nimport type { HeadersFactory } from '../configuration/otlp-http-configuration';\n\n/**\n * Maximum total body size for concurrent keepalive requests.\n * Browsers enforce a 64KiB cumulative limit across all pending keepalive requests.\n * We use 60KB to leave headroom for headers.\n * @see https://github.com/whatwg/fetch/issues/679\n * @see https://blog.huli.tw/2025/01/06/en/navigator-sendbeacon-64kib-and-source-code/\n */\nconst MAX_KEEPALIVE_BODY_SIZE = 60 * 1024;\n\n/**\n * Maximum concurrent keepalive requests.\n * Chrome enforces 9 concurrent keepalive fetch requests per renderer process.\n * @see https://github.com/whatwg/fetch/issues/679\n * Quote: \"If the renderer process is processing more than 9 requests with keepalive set, we reject a new request\"\n */\nconst MAX_KEEPALIVE_REQUESTS = 9;\n\n/**\n * Track cumulative pending body size across all in-flight keepalive requests.\n * This is necessary because the 64KiB limit is cumulative, not per-request.\n */\nlet pendingBodySize = 0;\n\n/**\n * Track number of pending keepalive requests.\n */\nlet pendingKeepaliveCount = 0;\n\nexport interface FetchTransportParameters {\n url: string;\n headers: HeadersFactory;\n}\n\nclass FetchTransport implements IExporterTransport {\n private _parameters: FetchTransportParameters;\n\n constructor(parameters: FetchTransportParameters) {\n this._parameters = parameters;\n }\n\n async send(data: Uint8Array, timeoutMillis: number): Promise<ExportResponse> {\n const abortController = new AbortController();\n const timeout = setTimeout(() => abortController.abort(), timeoutMillis);\n // Fetch API may be wrapped by an instrumentation like `@opentelemetry/instrumentation-fetch`.\n // In that case the instrumentation would create a new Span for this request\n // because the context manager cannot keep the context after `await` calls.\n // This creates an indirect endless loop Export -> Span -> Export\n // By using the `__original` function the instrumentation can't intercept the call\n // and no Span will be created breaking the vicious cycle\n let fetchApi = globalThis.fetch;\n // @ts-expect-error -- fetch could be wrapped\n if (typeof fetchApi.__original === 'function') {\n // @ts-expect-error -- fetch could be wrapped\n fetchApi = fetchApi.__original;\n }\n\n const requestSize = data.byteLength;\n\n // Determine if we can use keepalive based on cumulative browser limits.\n // We must check BEFORE adding to pending totals to avoid exceeding limits.\n const wouldExceedSize =\n pendingBodySize + requestSize > MAX_KEEPALIVE_BODY_SIZE;\n const wouldExceedCount = pendingKeepaliveCount >= MAX_KEEPALIVE_REQUESTS;\n const useKeepalive = !wouldExceedSize && !wouldExceedCount;\n\n if (useKeepalive) {\n pendingBodySize += requestSize;\n pendingKeepaliveCount++;\n } else {\n const reason = wouldExceedSize ? 'size limit' : 'count limit';\n diag.debug(\n `keepalive disabled: ${(requestSize / 1024).toFixed(1)}KB payload, ${pendingKeepaliveCount} pending (${reason})`\n );\n }\n\n try {\n const url = new URL(this._parameters.url);\n const response = await fetchApi(url.href, {\n method: 'POST',\n headers: await this._parameters.headers(),\n body: data,\n signal: abortController.signal,\n keepalive: useKeepalive,\n mode: globalThis.location\n ? globalThis.location.origin === url.origin\n ? 'same-origin'\n : 'cors'\n : 'no-cors',\n });\n\n if (response.status >= 200 && response.status <= 299) {\n diag.debug(`export response success (status: ${response.status})`);\n return { status: 'success' };\n } else if (isExportHTTPErrorRetryable(response.status)) {\n diag.warn(`export response retryable (status: ${response.status})`);\n const retryAfter = response.headers.get('Retry-After');\n const retryInMillis = parseRetryAfterToMills(retryAfter);\n return { status: 'retryable', retryInMillis };\n }\n diag.error(`export response failure (status: ${response.status})`);\n return {\n status: 'failure',\n error: new Error(\n `Fetch request failed with non-retryable status ${response.status}`\n ),\n };\n } catch (error) {\n if (isFetchNetworkErrorRetryable(error)) {\n diag.warn(`export request retryable (network error: ${error})`);\n return {\n status: 'retryable',\n error: new Error('Fetch request encountered a network error', {\n cause: error,\n }),\n };\n }\n diag.error(`export request failure (error: ${error})`);\n return {\n status: 'failure',\n error: new Error('Fetch request errored', { cause: error }),\n };\n } finally {\n clearTimeout(timeout);\n if (useKeepalive) {\n pendingBodySize -= requestSize;\n pendingKeepaliveCount--;\n }\n }\n }\n\n shutdown() {\n // Intentionally left empty, nothing to do.\n }\n}\n\n/**\n * Creates an exporter transport that uses `fetch` to send the data\n * @param parameters applied to each request made by transport\n */\nexport function createFetchTransport(\n parameters: FetchTransportParameters\n): IExporterTransport {\n return new FetchTransport(parameters);\n}\n\nfunction isFetchNetworkErrorRetryable(error: unknown): boolean {\n return error instanceof TypeError && !error.cause;\n}\n"]}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { IExporterTransport } from '../exporter-transport';
|
|
2
|
-
import type { NodeHttpRequestParameters } from './node-http-transport-types';
|
|
3
|
-
export declare function createHttpExporterTransport(parameters: NodeHttpRequestParameters): IExporterTransport;
|
|
4
|
-
//# sourceMappingURL=http-exporter-transport.d.ts.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { sendWithHttp } from './http-transport-utils';
|
|
6
|
-
class HttpExporterTransport {
|
|
7
|
-
_utils = null;
|
|
8
|
-
_parameters;
|
|
9
|
-
constructor(parameters) {
|
|
10
|
-
this._parameters = parameters;
|
|
11
|
-
}
|
|
12
|
-
async send(data, timeoutMillis) {
|
|
13
|
-
const { agent, request } = await this._loadUtils();
|
|
14
|
-
const headers = await this._parameters.headers();
|
|
15
|
-
return sendWithHttp(request, this._parameters.url, headers, this._parameters.compression, this._parameters.userAgent, agent, data, timeoutMillis);
|
|
16
|
-
}
|
|
17
|
-
shutdown() {
|
|
18
|
-
// intentionally left empty, nothing to do.
|
|
19
|
-
}
|
|
20
|
-
async _loadUtils() {
|
|
21
|
-
let utils = this._utils;
|
|
22
|
-
if (utils === null) {
|
|
23
|
-
const protocol = new URL(this._parameters.url).protocol;
|
|
24
|
-
const [agent, request] = await Promise.all([
|
|
25
|
-
this._parameters.agentFactory(protocol),
|
|
26
|
-
requestFunctionFactory(protocol),
|
|
27
|
-
]);
|
|
28
|
-
utils = this._utils = { agent, request };
|
|
29
|
-
}
|
|
30
|
-
return utils;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
async function requestFunctionFactory(protocol) {
|
|
34
|
-
const module = protocol === 'http:' ? import('http') : import('https');
|
|
35
|
-
const { request } = await module;
|
|
36
|
-
return request;
|
|
37
|
-
}
|
|
38
|
-
export function createHttpExporterTransport(parameters) {
|
|
39
|
-
return new HttpExporterTransport(parameters);
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=http-exporter-transport.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-exporter-transport.js","sourceRoot":"","sources":["../../../src/transport/http-exporter-transport.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAQtD,MAAM,qBAAqB;IACjB,MAAM,GAAiB,IAAI,CAAC;IAC5B,WAAW,CAA4B;IAE/C,YAAY,UAAqC;QAC/C,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAgB,EAAE,aAAqB;QAChD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QACnD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;QAEjD,OAAO,YAAY,CACjB,OAAO,EACP,IAAI,CAAC,WAAW,CAAC,GAAG,EACpB,OAAO,EACP,IAAI,CAAC,WAAW,CAAC,WAAW,EAC5B,IAAI,CAAC,WAAW,CAAC,SAAS,EAC1B,KAAK,EACL,IAAI,EACJ,aAAa,CACd,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,2CAA2C;IAC7C,CAAC;IAEO,KAAK,CAAC,UAAU;QACtB,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAExB,IAAI,KAAK,KAAK,IAAI,EAAE;YAClB,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;YACxD,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;gBACzC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC;gBACvC,sBAAsB,CAAC,QAAQ,CAAC;aACjC,CAAC,CAAC;YACH,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;SAC1C;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAED,KAAK,UAAU,sBAAsB,CACnC,QAAgB;IAEhB,MAAM,MAAM,GAAG,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACvE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC;IACjC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,UAAqC;IAErC,OAAO,IAAI,qBAAqB,CAAC,UAAU,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// NOTE: do not change these type imports to actual imports. Doing so WILL break `@opentelemetry/instrumentation-http`,\n// as they'd be imported before the http/https modules can be wrapped.\nimport type * as https from 'https';\nimport type * as http from 'http';\nimport type { ExportResponse } from '../export-response';\nimport type { IExporterTransport } from '../exporter-transport';\nimport { sendWithHttp } from './http-transport-utils';\nimport type { NodeHttpRequestParameters } from './node-http-transport-types';\n\ninterface Utils {\n agent: http.Agent | https.Agent;\n request: typeof http.request | typeof https.request;\n}\n\nclass HttpExporterTransport implements IExporterTransport {\n private _utils: Utils | null = null;\n private _parameters: NodeHttpRequestParameters;\n\n constructor(parameters: NodeHttpRequestParameters) {\n this._parameters = parameters;\n }\n\n async send(data: Uint8Array, timeoutMillis: number): Promise<ExportResponse> {\n const { agent, request } = await this._loadUtils();\n const headers = await this._parameters.headers();\n\n return sendWithHttp(\n request,\n this._parameters.url,\n headers,\n this._parameters.compression,\n this._parameters.userAgent,\n agent,\n data,\n timeoutMillis\n );\n }\n\n shutdown() {\n // intentionally left empty, nothing to do.\n }\n\n private async _loadUtils(): Promise<Utils> {\n let utils = this._utils;\n\n if (utils === null) {\n const protocol = new URL(this._parameters.url).protocol;\n const [agent, request] = await Promise.all([\n this._parameters.agentFactory(protocol),\n requestFunctionFactory(protocol),\n ]);\n utils = this._utils = { agent, request };\n }\n\n return utils;\n }\n}\n\nasync function requestFunctionFactory(\n protocol: string\n): Promise<typeof http.request | typeof https.request> {\n const module = protocol === 'http:' ? import('http') : import('https');\n const { request } = await module;\n return request;\n}\n\nexport function createHttpExporterTransport(\n parameters: NodeHttpRequestParameters\n): IExporterTransport {\n return new HttpExporterTransport(parameters);\n}\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { HeadersFactory } from '../configuration/otlp-http-configuration';
|
|
2
|
-
export interface HttpRequestParameters {
|
|
3
|
-
url: string;
|
|
4
|
-
headers: HeadersFactory;
|
|
5
|
-
compression: 'gzip' | 'none';
|
|
6
|
-
userAgent?: string;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=http-transport-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-transport-types.js","sourceRoot":"","sources":["../../../src/transport/http-transport-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { HeadersFactory } from '../configuration/otlp-http-configuration';\n\nexport interface HttpRequestParameters {\n url: string;\n headers: HeadersFactory;\n compression: 'gzip' | 'none';\n userAgent?: string;\n}\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type * as http from 'http';
|
|
4
|
-
import type * as https from 'https';
|
|
5
|
-
import type { ExportResponse } from '../export-response';
|
|
6
|
-
/**
|
|
7
|
-
* Maximum response body size (4 MB) that the HTTP transport will read.
|
|
8
|
-
* If the server sends more data the connection is destroyed and the export
|
|
9
|
-
* is treated as a non-retryable error regardless of status code.
|
|
10
|
-
*/
|
|
11
|
-
export declare const MAX_RESPONSE_BODY_SIZE: number;
|
|
12
|
-
/**
|
|
13
|
-
* Sends data using http
|
|
14
|
-
* @param request
|
|
15
|
-
* @param url
|
|
16
|
-
* @param headers
|
|
17
|
-
* @param compression
|
|
18
|
-
* @param userAgent
|
|
19
|
-
* @param agent
|
|
20
|
-
* @param data
|
|
21
|
-
* @param timeoutMillis
|
|
22
|
-
*/
|
|
23
|
-
export declare function sendWithHttp(request: typeof https.request | typeof http.request, url: string, headers: Record<string, string>, compression: 'gzip' | 'none', userAgent: string | undefined, agent: http.Agent | https.Agent, data: Uint8Array, timeoutMillis: number): Promise<ExportResponse>;
|
|
24
|
-
export declare function compressAndSend(req: http.ClientRequest, compression: 'gzip' | 'none', data: Uint8Array, onError: (error: Error) => void): void;
|
|
25
|
-
//# sourceMappingURL=http-transport-utils.d.ts.map
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import * as zlib from 'zlib';
|
|
2
|
-
import { Readable } from 'stream';
|
|
3
|
-
import { isExportHTTPErrorRetryable, parseRetryAfterToMills, } from '../is-export-retryable';
|
|
4
|
-
import { OTLPExporterError } from '../types';
|
|
5
|
-
import { VERSION } from '../version';
|
|
6
|
-
const DEFAULT_USER_AGENT = `OTel-OTLP-Exporter-JavaScript/${VERSION}`;
|
|
7
|
-
/**
|
|
8
|
-
* Maximum response body size (4 MB) that the HTTP transport will read.
|
|
9
|
-
* If the server sends more data the connection is destroyed and the export
|
|
10
|
-
* is treated as a non-retryable error regardless of status code.
|
|
11
|
-
*/
|
|
12
|
-
export const MAX_RESPONSE_BODY_SIZE = 4 * 1024 * 1024;
|
|
13
|
-
/**
|
|
14
|
-
* Sends data using http
|
|
15
|
-
* @param request
|
|
16
|
-
* @param url
|
|
17
|
-
* @param headers
|
|
18
|
-
* @param compression
|
|
19
|
-
* @param userAgent
|
|
20
|
-
* @param agent
|
|
21
|
-
* @param data
|
|
22
|
-
* @param timeoutMillis
|
|
23
|
-
*/
|
|
24
|
-
export function sendWithHttp(request, url, headers, compression, userAgent, agent, data, timeoutMillis) {
|
|
25
|
-
return new Promise(resolve => {
|
|
26
|
-
const parsedUrl = new URL(url);
|
|
27
|
-
if (userAgent) {
|
|
28
|
-
headers['User-Agent'] = `${userAgent} ${DEFAULT_USER_AGENT}`;
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
headers['User-Agent'] = DEFAULT_USER_AGENT;
|
|
32
|
-
}
|
|
33
|
-
const options = {
|
|
34
|
-
method: 'POST',
|
|
35
|
-
headers,
|
|
36
|
-
agent,
|
|
37
|
-
};
|
|
38
|
-
const req = request(parsedUrl, options, (res) => {
|
|
39
|
-
const responseData = [];
|
|
40
|
-
let responseSize = 0;
|
|
41
|
-
res.on('data', (chunk) => {
|
|
42
|
-
responseSize += chunk.length;
|
|
43
|
-
if (responseSize > MAX_RESPONSE_BODY_SIZE) {
|
|
44
|
-
const sizeError = new Error(`OTLP export response body exceeded size limit of ${MAX_RESPONSE_BODY_SIZE} bytes`);
|
|
45
|
-
// Oversized responses are treated as non-retryable errors
|
|
46
|
-
// regardless of status code.
|
|
47
|
-
// Resolve before destroying: res.destroy() tears down the socket which
|
|
48
|
-
// triggers ECONNRESET on req.on('error'), so, resolving first makes that
|
|
49
|
-
// a no-op. res.on('error') does not fire because destroy() is called
|
|
50
|
-
// without an error argument.
|
|
51
|
-
resolve({ status: 'failure', error: sizeError });
|
|
52
|
-
res.destroy();
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
responseData.push(chunk);
|
|
56
|
-
});
|
|
57
|
-
res.on('end', () => {
|
|
58
|
-
if (res.statusCode && res.statusCode <= 299) {
|
|
59
|
-
resolve({
|
|
60
|
-
status: 'success',
|
|
61
|
-
data: Buffer.concat(responseData),
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
else if (res.statusCode &&
|
|
65
|
-
isExportHTTPErrorRetryable(res.statusCode)) {
|
|
66
|
-
resolve({
|
|
67
|
-
status: 'retryable',
|
|
68
|
-
retryInMillis: parseRetryAfterToMills(res.headers['retry-after']),
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
const error = new OTLPExporterError(res.statusMessage, res.statusCode, Buffer.concat(responseData).toString());
|
|
73
|
-
resolve({
|
|
74
|
-
status: 'failure',
|
|
75
|
-
error,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
res.on('error', (error) => {
|
|
80
|
-
// Note: 'end' may still be emitted after 'error' on the same response object, since we're resolving a promise,
|
|
81
|
-
// the first call to resolve() will determine the final state.
|
|
82
|
-
if (res.statusCode && res.statusCode <= 299) {
|
|
83
|
-
// If the response is successful but an error occurs while reading the response,
|
|
84
|
-
// we consider it a success since the data has been sent successfully.
|
|
85
|
-
resolve({
|
|
86
|
-
status: 'success',
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
else if (res.statusCode &&
|
|
90
|
-
isExportHTTPErrorRetryable(res.statusCode)) {
|
|
91
|
-
resolve({
|
|
92
|
-
status: 'retryable',
|
|
93
|
-
error: error,
|
|
94
|
-
retryInMillis: parseRetryAfterToMills(res.headers['retry-after']),
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
resolve({
|
|
99
|
-
status: 'failure',
|
|
100
|
-
error,
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
req.setTimeout(timeoutMillis, () => {
|
|
106
|
-
req.destroy();
|
|
107
|
-
resolve({
|
|
108
|
-
status: 'retryable',
|
|
109
|
-
error: new Error('Request timed out'),
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
req.on('error', (error) => {
|
|
113
|
-
if (isHttpTransportNetworkErrorRetryable(error)) {
|
|
114
|
-
resolve({
|
|
115
|
-
status: 'retryable',
|
|
116
|
-
error,
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
resolve({
|
|
121
|
-
status: 'failure',
|
|
122
|
-
error,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
compressAndSend(req, compression, data, (error) => {
|
|
127
|
-
resolve({
|
|
128
|
-
status: 'failure',
|
|
129
|
-
error,
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
export function compressAndSend(req, compression, data, onError) {
|
|
135
|
-
let dataStream = readableFromUint8Array(data);
|
|
136
|
-
if (compression === 'gzip') {
|
|
137
|
-
req.setHeader('Content-Encoding', 'gzip');
|
|
138
|
-
dataStream = dataStream
|
|
139
|
-
.on('error', onError)
|
|
140
|
-
.pipe(zlib.createGzip())
|
|
141
|
-
.on('error', onError);
|
|
142
|
-
}
|
|
143
|
-
dataStream.pipe(req).on('error', onError);
|
|
144
|
-
}
|
|
145
|
-
function readableFromUint8Array(buff) {
|
|
146
|
-
const readable = new Readable();
|
|
147
|
-
readable.push(buff);
|
|
148
|
-
readable.push(null);
|
|
149
|
-
return readable;
|
|
150
|
-
}
|
|
151
|
-
function isHttpTransportNetworkErrorRetryable(error) {
|
|
152
|
-
const RETRYABLE_NETWORK_ERROR_CODES = new Set([
|
|
153
|
-
'ECONNRESET',
|
|
154
|
-
'ECONNREFUSED',
|
|
155
|
-
'EPIPE',
|
|
156
|
-
'ETIMEDOUT',
|
|
157
|
-
'EAI_AGAIN',
|
|
158
|
-
'ENOTFOUND',
|
|
159
|
-
'ENETUNREACH',
|
|
160
|
-
'EHOSTUNREACH',
|
|
161
|
-
]);
|
|
162
|
-
if ('code' in error && typeof error.code === 'string') {
|
|
163
|
-
return RETRYABLE_NETWORK_ERROR_CODES.has(error.code);
|
|
164
|
-
}
|
|
165
|
-
return false;
|
|
166
|
-
}
|
|
167
|
-
//# sourceMappingURL=http-transport-utils.js.map
|