From d6328cb261bc0adac3e9b7d631cb4f2530c43727 Mon Sep 17 00:00:00 2001 From: svrnm Date: Wed, 21 Dec 2022 12:44:46 +0100 Subject: [PATCH 1/3] Add Resource Detectors to payment service Signed-off-by: svrnm --- CHANGELOG.md | 1 + docs/services/paymentservice.md | 18 +- src/paymentservice/opentelemetry.js | 18 +- src/paymentservice/package-lock.json | 338 +++++++++++++++++++++++++++ src/paymentservice/package.json | 4 + 5 files changed, 377 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16a932afb1..ac48d20261 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -156,3 +156,4 @@ significant modifications will be credited to OpenTelemetry Authors. ([#617](https://github.com/open-telemetry/opentelemetry-demo/pull/617)) * Use `frontend-web` as service name for browser/web requests ([#628](https://github.com/open-telemetry/opentelemetry-demo/pull/628)) +* Add resource detectors to payment service diff --git a/docs/services/paymentservice.md b/docs/services/paymentservice.md index 5973da6464..1702464fd5 100644 --- a/docs/services/paymentservice.md +++ b/docs/services/paymentservice.md @@ -24,7 +24,12 @@ 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 { 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(), @@ -32,6 +37,17 @@ const sdk = new opentelemetry.NodeSDK({ metricReader: new PeriodicExportingMetricReader({ exporter: new OTLPMetricExporter() }), + resourceDetectors: [ + containerDetector, + envDetector, + hostDetector, + osDetector, + processDetector, + alibabaCloudEcsDetector, + awsEksDetector, + awsEc2Detector, + gcpDetector + ], }) sdk.start().then(() => require("./index")); diff --git a/src/paymentservice/opentelemetry.js b/src/paymentservice/opentelemetry.js index 16402fe747..b06de558ea 100644 --- a/src/paymentservice/opentelemetry.js +++ b/src/paymentservice/opentelemetry.js @@ -2,7 +2,12 @@ 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 { 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(), @@ -10,6 +15,17 @@ const sdk = new opentelemetry.NodeSDK({ metricReader: new PeriodicExportingMetricReader({ exporter: new OTLPMetricExporter() }), + resourceDetectors: [ + containerDetector, + envDetector, + hostDetector, + osDetector, + processDetector, + alibabaCloudEcsDetector, + awsEksDetector, + awsEc2Detector, + gcpDetector + ], }) sdk.start().then(() => require("./index")); diff --git a/src/paymentservice/package-lock.json b/src/paymentservice/package-lock.json index 64e3aafec9..57294d5637 100644 --- a/src/paymentservice/package-lock.json +++ b/src/paymentservice/package-lock.json @@ -17,6 +17,10 @@ "@opentelemetry/core": "1.7.0", "@opentelemetry/exporter-metrics-otlp-grpc": "0.33.0", "@opentelemetry/exporter-trace-otlp-grpc": "0.33.0", + "@opentelemetry/resource-detector-alibaba-cloud": "^0.27.3", + "@opentelemetry/resource-detector-aws": "^1.2.1", + "@opentelemetry/resource-detector-container": "^0.2.1", + "@opentelemetry/resource-detector-gcp": "^0.27.4", "@opentelemetry/sdk-metrics": "0.33.0", "@opentelemetry/sdk-node": "0.33.0", "grpc-js-health-check": "^1.0.2", @@ -1120,6 +1124,84 @@ "@opentelemetry/api": ">=1.0.0 <1.3.0" } }, + "node_modules/@opentelemetry/resource-detector-alibaba-cloud": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-alibaba-cloud/-/resource-detector-alibaba-cloud-0.27.3.tgz", + "integrity": "sha512-ZccTKPjPfwzgFCG5Fzymmo5PzJRzwOg66W2RH2zOLsc8uy0NNEWRdFIDZwVhSwdVCEvC93SvJVbWqgxccMLYuA==", + "dependencies": { + "@opentelemetry/resources": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.0.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "node_modules/@opentelemetry/resource-detector-aws": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-aws/-/resource-detector-aws-1.2.1.tgz", + "integrity": "sha512-ryfMZ644kCLMs+PtoUeW8A5ewYEOm0UBnQJAuFnj2MPofA+pTrXEbfJ39kcVlH5qZKJR6xa9GNB1lRIEv2bA7w==", + "dependencies": { + "@opentelemetry/core": "^1.0.0", + "@opentelemetry/resources": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.0.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "node_modules/@opentelemetry/resource-detector-container": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-container/-/resource-detector-container-0.2.1.tgz", + "integrity": "sha512-yD5UVMyfmwqNPDaaAMymQFb8cmPzdePO3QnaL34MPTtEH6vgPbuLzr2YXPWWr9bUvM6tTDc2Rq+hgzU9Qa1saQ==", + "dependencies": { + "@opentelemetry/resources": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.0.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "node_modules/@opentelemetry/resource-detector-gcp": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-gcp/-/resource-detector-gcp-0.27.4.tgz", + "integrity": "sha512-domGKsMIIVAmfgH7OH6N3y1EHZuv/pHS1QY8YadyXemGnYyh8J/MyjDfz5fGoQ12xdawfslF8+6pWumxPwJT6A==", + "dependencies": { + "@opentelemetry/core": "^1.0.0", + "@opentelemetry/resources": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.0.0", + "gcp-metadata": "^5.0.0", + "semver": "7.3.5" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "node_modules/@opentelemetry/resource-detector-gcp/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@opentelemetry/resources": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.7.0.tgz", @@ -1613,6 +1695,17 @@ "resolved": "https://registry.npmjs.org/abstract-logging/-/abstract-logging-2.0.1.tgz", "integrity": "sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==" }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/ajv": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", @@ -1689,6 +1782,14 @@ "fastq": "^1.6.1" } }, + "node_modules/bignumber.js": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", + "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", + "engines": { + "node": "*" + } + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -1760,6 +1861,11 @@ "node": ">=6" } }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, "node_modules/fast-decode-uri-component": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz", @@ -1859,6 +1965,32 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "node_modules/gaxios": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.0.2.tgz", + "integrity": "sha512-TjtV2AJOZoMQqRYoy5eM8cCQogYwazWNYLQ72QB0kwa6vHHruYkGmhhyrlzbmgNHK1dNnuP2WSH81urfzyN2Og==", + "dependencies": { + "extend": "^3.0.2", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.7" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/gcp-metadata": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.1.0.tgz", + "integrity": "sha512-QVjouEXvNVG/nde6VZDXXFTB02xQdztaumkWCHUff58qsdCS05/8OPh68fQ2QnArfAzZTwfEc979FHSHsU8EWg==", + "dependencies": { + "gaxios": "^5.0.0", + "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -1933,6 +2065,18 @@ "node": ">= 0.4.0" } }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -1960,6 +2104,17 @@ "node": ">=8" } }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/joi": { "version": "17.6.0", "resolved": "https://registry.npmjs.org/joi/-/joi-17.6.0.tgz", @@ -1972,6 +2127,14 @@ "@sideway/pinpoint": "^2.0.0" } }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -2028,6 +2191,25 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/on-exit-leak-free": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.0.tgz", @@ -2398,6 +2580,11 @@ "node": ">=6" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -2414,6 +2601,20 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -3241,6 +3442,56 @@ "@opentelemetry/core": "1.7.0" } }, + "@opentelemetry/resource-detector-alibaba-cloud": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-alibaba-cloud/-/resource-detector-alibaba-cloud-0.27.3.tgz", + "integrity": "sha512-ZccTKPjPfwzgFCG5Fzymmo5PzJRzwOg66W2RH2zOLsc8uy0NNEWRdFIDZwVhSwdVCEvC93SvJVbWqgxccMLYuA==", + "requires": { + "@opentelemetry/resources": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.0.0" + } + }, + "@opentelemetry/resource-detector-aws": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-aws/-/resource-detector-aws-1.2.1.tgz", + "integrity": "sha512-ryfMZ644kCLMs+PtoUeW8A5ewYEOm0UBnQJAuFnj2MPofA+pTrXEbfJ39kcVlH5qZKJR6xa9GNB1lRIEv2bA7w==", + "requires": { + "@opentelemetry/core": "^1.0.0", + "@opentelemetry/resources": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.0.0" + } + }, + "@opentelemetry/resource-detector-container": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-container/-/resource-detector-container-0.2.1.tgz", + "integrity": "sha512-yD5UVMyfmwqNPDaaAMymQFb8cmPzdePO3QnaL34MPTtEH6vgPbuLzr2YXPWWr9bUvM6tTDc2Rq+hgzU9Qa1saQ==", + "requires": { + "@opentelemetry/resources": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.0.0" + } + }, + "@opentelemetry/resource-detector-gcp": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-gcp/-/resource-detector-gcp-0.27.4.tgz", + "integrity": "sha512-domGKsMIIVAmfgH7OH6N3y1EHZuv/pHS1QY8YadyXemGnYyh8J/MyjDfz5fGoQ12xdawfslF8+6pWumxPwJT6A==", + "requires": { + "@opentelemetry/core": "^1.0.0", + "@opentelemetry/resources": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.0.0", + "gcp-metadata": "^5.0.0", + "semver": "7.3.5" + }, + "dependencies": { + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, "@opentelemetry/resources": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.7.0.tgz", @@ -3692,6 +3943,14 @@ "resolved": "https://registry.npmjs.org/abstract-logging/-/abstract-logging-2.0.1.tgz", "integrity": "sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==" }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + } + }, "ajv": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", @@ -3744,6 +4003,11 @@ "fastq": "^1.6.1" } }, + "bignumber.js": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", + "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==" + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -3795,6 +4059,11 @@ "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, "fast-decode-uri-component": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz", @@ -3885,6 +4154,26 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "gaxios": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.0.2.tgz", + "integrity": "sha512-TjtV2AJOZoMQqRYoy5eM8cCQogYwazWNYLQ72QB0kwa6vHHruYkGmhhyrlzbmgNHK1dNnuP2WSH81urfzyN2Og==", + "requires": { + "extend": "^3.0.2", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.7" + } + }, + "gcp-metadata": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.1.0.tgz", + "integrity": "sha512-QVjouEXvNVG/nde6VZDXXFTB02xQdztaumkWCHUff58qsdCS05/8OPh68fQ2QnArfAzZTwfEc979FHSHsU8EWg==", + "requires": { + "gaxios": "^5.0.0", + "json-bigint": "^1.0.0" + } + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -3944,6 +4233,15 @@ "function-bind": "^1.1.1" } }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -3962,6 +4260,11 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + }, "joi": { "version": "17.6.0", "resolved": "https://registry.npmjs.org/joi/-/joi-17.6.0.tgz", @@ -3974,6 +4277,14 @@ "@sideway/pinpoint": "^2.0.0" } }, + "json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "requires": { + "bignumber.js": "^9.0.0" + } + }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -4027,6 +4338,14 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, "on-exit-leak-free": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.0.tgz", @@ -4315,6 +4634,11 @@ "resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-9.0.3.tgz", "integrity": "sha512-/i9GruRjXsnDgehxvy6iZ4AFNVxngEFbwzirhdulomMNPGPVV3ECMZOWSw0w4sRMZ9Al9m4jy08GPvRxRUGYlw==" }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -4328,6 +4652,20 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", diff --git a/src/paymentservice/package.json b/src/paymentservice/package.json index a74dab2a7d..298c71f79b 100644 --- a/src/paymentservice/package.json +++ b/src/paymentservice/package.json @@ -22,6 +22,10 @@ "@opentelemetry/exporter-trace-otlp-grpc": "0.33.0", "@opentelemetry/exporter-metrics-otlp-grpc": "0.33.0", "@opentelemetry/sdk-node": "0.33.0", + "@opentelemetry/resource-detector-alibaba-cloud": "^0.27.3", + "@opentelemetry/resource-detector-aws": "^1.2.1", + "@opentelemetry/resource-detector-container": "^0.2.1", + "@opentelemetry/resource-detector-gcp": "^0.27.4", "grpc-js-health-check": "^1.0.2", "pino": "8.7.0", "simple-card-validator": "1.1.0", From d9c60a3231f38c1412490c01b528e6030ca6fa50 Mon Sep 17 00:00:00 2001 From: svrnm Date: Wed, 21 Dec 2022 19:10:05 +0100 Subject: [PATCH 2/3] Update CHANGELOG Signed-off-by: svrnm --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac48d20261..d710d4829a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -157,3 +157,4 @@ significant modifications will be credited to OpenTelemetry Authors. * Use `frontend-web` as service name for browser/web requests ([#628](https://github.com/open-telemetry/opentelemetry-demo/pull/628)) * Add resource detectors to payment service +([#651](https://github.com/open-telemetry/opentelemetry-demo/pull/651)) From 2463792266824dbb4a7a6528ffd2755be4319b58 Mon Sep 17 00:00:00 2001 From: Severin Neumann Date: Thu, 22 Dec 2022 08:06:15 +0100 Subject: [PATCH 3/3] Update src/paymentservice/package.json Co-authored-by: Michael Maxwell --- src/paymentservice/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/paymentservice/package.json b/src/paymentservice/package.json index 298c71f79b..9d1702b465 100644 --- a/src/paymentservice/package.json +++ b/src/paymentservice/package.json @@ -22,10 +22,10 @@ "@opentelemetry/exporter-trace-otlp-grpc": "0.33.0", "@opentelemetry/exporter-metrics-otlp-grpc": "0.33.0", "@opentelemetry/sdk-node": "0.33.0", - "@opentelemetry/resource-detector-alibaba-cloud": "^0.27.3", - "@opentelemetry/resource-detector-aws": "^1.2.1", - "@opentelemetry/resource-detector-container": "^0.2.1", - "@opentelemetry/resource-detector-gcp": "^0.27.4", + "@opentelemetry/resource-detector-alibaba-cloud": "0.27.3", + "@opentelemetry/resource-detector-aws": "1.2.1", + "@opentelemetry/resource-detector-container": "0.2.1", + "@opentelemetry/resource-detector-gcp": "0.27.4", "grpc-js-health-check": "^1.0.2", "pino": "8.7.0", "simple-card-validator": "1.1.0",