diff --git a/src/paymentservice/opentelemetry.js b/src/paymentservice/opentelemetry.js deleted file mode 100644 index 0ba569cd30..0000000000 --- a/src/paymentservice/opentelemetry.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -const opentelemetry = require("@opentelemetry/sdk-node") -const {getNodeAutoInstrumentations} = require("@opentelemetry/auto-instrumentations-node") -const {OTLPTraceExporter} = require('@opentelemetry/exporter-trace-otlp-grpc') -const {OTLPMetricExporter} = require('@opentelemetry/exporter-metrics-otlp-grpc') -const {PeriodicExportingMetricReader} = require('@opentelemetry/sdk-metrics') -const {alibabaCloudEcsDetector} = require('@opentelemetry/resource-detector-alibaba-cloud') -const {awsEc2Detector, awsEksDetector} = require('@opentelemetry/resource-detector-aws') -const {containerDetector} = require('@opentelemetry/resource-detector-container') -const {gcpDetector} = require('@opentelemetry/resource-detector-gcp') -const {envDetector, hostDetector, osDetector, processDetector} = require('@opentelemetry/resources') - -const sdk = new opentelemetry.NodeSDK({ - traceExporter: new OTLPTraceExporter(), - instrumentations: [ - getNodeAutoInstrumentations({ - // only instrument fs if it is part of another trace - '@opentelemetry/instrumentation-fs': { - requireParentSpan: true, - }, - }) - ], - metricReader: new PeriodicExportingMetricReader({ - exporter: new OTLPMetricExporter() - }), - resourceDetectors: [ - containerDetector, - envDetector, - hostDetector, - osDetector, - processDetector, - alibabaCloudEcsDetector, - awsEksDetector, - awsEc2Detector, - gcpDetector - ], -}) - -sdk.start(); diff --git a/src/paymentservice/package-lock.json b/src/paymentservice/package-lock.json index 058be8814c..f2377b0f61 100644 --- a/src/paymentservice/package-lock.json +++ b/src/paymentservice/package-lock.json @@ -16,16 +16,6 @@ "@openfeature/server-sdk": "1.14.0", "@opentelemetry/api": "1.8.0", "@opentelemetry/auto-instrumentations-node": "0.46.1", - "@opentelemetry/core": "1.24.1", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.51.1", - "@opentelemetry/exporter-trace-otlp-grpc": "0.51.1", - "@opentelemetry/resource-detector-alibaba-cloud": "0.28.9", - "@opentelemetry/resource-detector-aws": "1.5.0", - "@opentelemetry/resource-detector-container": "0.3.9", - "@opentelemetry/resource-detector-gcp": "0.29.9", - "@opentelemetry/resources": "1.24.1", - "@opentelemetry/sdk-metrics": "1.24.1", - "@opentelemetry/sdk-node": "0.51.1", "grpc-js-health-check": "1.1.0", "pino": "8.16.1", "simple-card-validator": "1.1.0", @@ -1387,45 +1377,6 @@ "node": ">=14" } }, - "node_modules/@opentelemetry/exporter-metrics-otlp-grpc": { - "version": "0.51.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.51.1.tgz", - "integrity": "sha512-YhND/e3zvQMvChrF9nduDqT+rZN4X5BDZUidiupYtHe+yhLyUSACkJcTuygMLrJfrGccJiwCZoZxJmz8hw0Vog==", - "dependencies": { - "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.24.1", - "@opentelemetry/exporter-metrics-otlp-http": "0.51.1", - "@opentelemetry/otlp-exporter-base": "0.51.1", - "@opentelemetry/otlp-grpc-exporter-base": "0.51.1", - "@opentelemetry/otlp-transformer": "0.51.1", - "@opentelemetry/resources": "1.24.1", - "@opentelemetry/sdk-metrics": "1.24.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-http": { - "version": "0.51.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.51.1.tgz", - "integrity": "sha512-oFXvif9iksHUxrzG3P8ohMLt7xSrl+oDMqxD/3XXndU761RFAKSbRDpfrQs25U5D+A2aMV3qk+4kfUWdJhZ77g==", - "dependencies": { - "@opentelemetry/core": "1.24.1", - "@opentelemetry/otlp-exporter-base": "0.51.1", - "@opentelemetry/otlp-transformer": "0.51.1", - "@opentelemetry/resources": "1.24.1", - "@opentelemetry/sdk-metrics": "1.24.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, "node_modules/@opentelemetry/exporter-metrics-otlp-proto": { "version": "0.52.0", "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-proto/-/exporter-metrics-otlp-proto-0.52.0.tgz", diff --git a/src/paymentservice/package.json b/src/paymentservice/package.json index 4143f6e005..be29893782 100644 --- a/src/paymentservice/package.json +++ b/src/paymentservice/package.json @@ -19,16 +19,6 @@ "@openfeature/server-sdk": "1.14.0", "@opentelemetry/api": "1.8.0", "@opentelemetry/auto-instrumentations-node": "0.46.1", - "@opentelemetry/core": "1.24.1", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.51.1", - "@opentelemetry/exporter-trace-otlp-grpc": "0.51.1", - "@opentelemetry/resource-detector-alibaba-cloud": "0.28.9", - "@opentelemetry/resource-detector-aws": "1.5.0", - "@opentelemetry/resource-detector-container": "0.3.9", - "@opentelemetry/resource-detector-gcp": "0.29.9", - "@opentelemetry/resources": "1.24.1", - "@opentelemetry/sdk-metrics": "1.24.1", - "@opentelemetry/sdk-node": "0.51.1", "grpc-js-health-check": "1.1.0", "pino": "8.16.1", "simple-card-validator": "1.1.0",