From 686375ea750415bd1bdee6019fb9c75ca3112f26 Mon Sep 17 00:00:00 2001 From: TomyJan Date: Thu, 8 Aug 2024 12:33:26 +0800 Subject: [PATCH] feat(http): show route in span name --- package-lock.json | 12 ++++++------ package.json | 6 +++--- .../package-lock.json | 4 ++-- .../opentelemetry-instrumentation-http/package.json | 2 +- .../opentelemetry-instrumentation-http/src/http.ts | 2 ++ 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index f2e0d43..456f67d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tachybase/opentelemetry-auto-instrumentations", - "version": "0.0.2", + "version": "0.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@tachybase/opentelemetry-auto-instrumentations", - "version": "0.0.2", + "version": "0.0.3", "license": "Apache-2.0", "workspaces": [ "/*" @@ -58,7 +58,7 @@ "@opentelemetry/resource-detector-gcp": "^0.29.10", "@opentelemetry/resources": "^1.24.0", "@opentelemetry/sdk-node": "^0.52.0", - "@tachybase/opentelemetry-instrumentation-http": "^0.0.1" + "@tachybase/opentelemetry-instrumentation-http": "^0.0.2" }, "devDependencies": { "@opentelemetry/api": "^1.4.1", @@ -3933,9 +3933,9 @@ "dev": true }, "node_modules/@tachybase/opentelemetry-instrumentation-http": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@tachybase/opentelemetry-instrumentation-http/-/opentelemetry-instrumentation-http-0.0.1.tgz", - "integrity": "sha512-7gnwXS9OesmY36s09YlwJgLEv93EoRSrChqw5HhraRtDzEcatYsFUdhaO/QpGMwnp70SG1Nd4hj5yN2CGvvPcA==", + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@tachybase/opentelemetry-instrumentation-http/-/opentelemetry-instrumentation-http-0.0.2.tgz", + "integrity": "sha512-tCfMAuRH0nmUpVpwAIuhfCC9vQu12mHaPw9Hz3oef5OnKFRafXXPNPZOXv2SHlgB8EiNXfE24PsGOs9QE7SDrA==", "dependencies": { "@opentelemetry/core": "1.25.1", "@opentelemetry/instrumentation": "0.52.1", diff --git a/package.json b/package.json index aedab52..c8a33be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tachybase/opentelemetry-auto-instrumentations", - "version": "0.0.2", + "version": "0.0.3", "description": "Metapackage of telemetry for TachyBase which bundles OpenTelemetry node core and instrumentations", "author": "TachyBase Team", "homepage": "https://git.daoyoucloud.com/TomyJan/opentelemetry-auto-instrumentations", @@ -76,7 +76,6 @@ "@opentelemetry/instrumentation-graphql": "^0.42.0", "@opentelemetry/instrumentation-grpc": "^0.52.0", "@opentelemetry/instrumentation-hapi": "^0.40.0", - "@tachybase/opentelemetry-instrumentation-http": "^0.0.1", "@opentelemetry/instrumentation-ioredis": "^0.42.0", "@opentelemetry/instrumentation-kafkajs": "^0.2.0", "@opentelemetry/instrumentation-knex": "^0.39.0", @@ -105,7 +104,8 @@ "@opentelemetry/resource-detector-container": "^0.3.11", "@opentelemetry/resource-detector-gcp": "^0.29.10", "@opentelemetry/resources": "^1.24.0", - "@opentelemetry/sdk-node": "^0.52.0" + "@opentelemetry/sdk-node": "^0.52.0", + "@tachybase/opentelemetry-instrumentation-http": "^0.0.2" }, "files": [ "build/src/**/*.js", diff --git a/plugins/node/opentelemetry-instrumentation-http/package-lock.json b/plugins/node/opentelemetry-instrumentation-http/package-lock.json index bed2327..d579944 100644 --- a/plugins/node/opentelemetry-instrumentation-http/package-lock.json +++ b/plugins/node/opentelemetry-instrumentation-http/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tachybase/opentelemetry-instrumentation-http", - "version": "0.0.1", + "version": "0.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@tachybase/opentelemetry-instrumentation-http", - "version": "0.0.1", + "version": "0.0.2", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "1.25.1", diff --git a/plugins/node/opentelemetry-instrumentation-http/package.json b/plugins/node/opentelemetry-instrumentation-http/package.json index 0ee75b2..d38513d 100644 --- a/plugins/node/opentelemetry-instrumentation-http/package.json +++ b/plugins/node/opentelemetry-instrumentation-http/package.json @@ -1,6 +1,6 @@ { "name": "@tachybase/opentelemetry-instrumentation-http", - "version": "0.0.1", + "version": "0.0.2", "description": "OpenTelemetry instrumentation for `node:http` and `node:https` http client and server modules for TachyBase", "author": "TachyBase Team", "homepage": "https://git.daoyoucloud.com/TomyJan/opentelemetry-auto-instrumentations/plugins/node/opentelemetry-instrumentation-http", diff --git a/plugins/node/opentelemetry-instrumentation-http/src/http.ts b/plugins/node/opentelemetry-instrumentation-http/src/http.ts index 4797269..74ed1cd 100644 --- a/plugins/node/opentelemetry-instrumentation-http/src/http.ts +++ b/plugins/node/opentelemetry-instrumentation-http/src/http.ts @@ -773,6 +773,8 @@ export class HttpInstrumentation extends InstrumentationBase