Compare commits

..

No commits in common. "f96a636780264f1b19c815fe851f540f8981c38d" and "6a84a8bb8b26522bdcc2843e352cf4e406079dfa" have entirely different histories.

5 changed files with 12 additions and 15 deletions

12
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@tachybase/opentelemetry-auto-instrumentations", "name": "@tachybase/opentelemetry-auto-instrumentations",
"version": "0.1.0", "version": "0.0.2",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@tachybase/opentelemetry-auto-instrumentations", "name": "@tachybase/opentelemetry-auto-instrumentations",
"version": "0.1.0", "version": "0.0.2",
"license": "Apache-2.0", "license": "Apache-2.0",
"workspaces": [ "workspaces": [
"/*" "/*"
@ -58,7 +58,7 @@
"@opentelemetry/resource-detector-gcp": "^0.29.10", "@opentelemetry/resource-detector-gcp": "^0.29.10",
"@opentelemetry/resources": "^1.24.0", "@opentelemetry/resources": "^1.24.0",
"@opentelemetry/sdk-node": "^0.52.0", "@opentelemetry/sdk-node": "^0.52.0",
"@tachybase/opentelemetry-instrumentation-http": "^0.1.0" "@tachybase/opentelemetry-instrumentation-http": "^0.0.1"
}, },
"devDependencies": { "devDependencies": {
"@opentelemetry/api": "^1.4.1", "@opentelemetry/api": "^1.4.1",
@ -3933,9 +3933,9 @@
"dev": true "dev": true
}, },
"node_modules/@tachybase/opentelemetry-instrumentation-http": { "node_modules/@tachybase/opentelemetry-instrumentation-http": {
"version": "0.1.0", "version": "0.0.1",
"resolved": "https://registry.npmjs.org/@tachybase/opentelemetry-instrumentation-http/-/opentelemetry-instrumentation-http-0.1.0.tgz", "resolved": "https://registry.npmjs.org/@tachybase/opentelemetry-instrumentation-http/-/opentelemetry-instrumentation-http-0.0.1.tgz",
"integrity": "sha512-e8Ie6yTDy+qkedfGPLKpYj4n/30KrbJSNuVm9HsMjuq95SCe1GFVCIU1e0I9lkOeveUqCSk/n/R6OQa0pI1Rbg==", "integrity": "sha512-7gnwXS9OesmY36s09YlwJgLEv93EoRSrChqw5HhraRtDzEcatYsFUdhaO/QpGMwnp70SG1Nd4hj5yN2CGvvPcA==",
"dependencies": { "dependencies": {
"@opentelemetry/core": "1.25.1", "@opentelemetry/core": "1.25.1",
"@opentelemetry/instrumentation": "0.52.1", "@opentelemetry/instrumentation": "0.52.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@tachybase/opentelemetry-auto-instrumentations", "name": "@tachybase/opentelemetry-auto-instrumentations",
"version": "0.1.0", "version": "0.0.2",
"description": "Metapackage of telemetry for TachyBase which bundles OpenTelemetry node core and instrumentations", "description": "Metapackage of telemetry for TachyBase which bundles OpenTelemetry node core and instrumentations",
"author": "TachyBase Team", "author": "TachyBase Team",
"homepage": "https://git.daoyoucloud.com/TomyJan/opentelemetry-auto-instrumentations", "homepage": "https://git.daoyoucloud.com/TomyJan/opentelemetry-auto-instrumentations",
@ -76,6 +76,7 @@
"@opentelemetry/instrumentation-graphql": "^0.42.0", "@opentelemetry/instrumentation-graphql": "^0.42.0",
"@opentelemetry/instrumentation-grpc": "^0.52.0", "@opentelemetry/instrumentation-grpc": "^0.52.0",
"@opentelemetry/instrumentation-hapi": "^0.40.0", "@opentelemetry/instrumentation-hapi": "^0.40.0",
"@tachybase/opentelemetry-instrumentation-http": "^0.0.1",
"@opentelemetry/instrumentation-ioredis": "^0.42.0", "@opentelemetry/instrumentation-ioredis": "^0.42.0",
"@opentelemetry/instrumentation-kafkajs": "^0.2.0", "@opentelemetry/instrumentation-kafkajs": "^0.2.0",
"@opentelemetry/instrumentation-knex": "^0.39.0", "@opentelemetry/instrumentation-knex": "^0.39.0",
@ -104,8 +105,7 @@
"@opentelemetry/resource-detector-container": "^0.3.11", "@opentelemetry/resource-detector-container": "^0.3.11",
"@opentelemetry/resource-detector-gcp": "^0.29.10", "@opentelemetry/resource-detector-gcp": "^0.29.10",
"@opentelemetry/resources": "^1.24.0", "@opentelemetry/resources": "^1.24.0",
"@opentelemetry/sdk-node": "^0.52.0", "@opentelemetry/sdk-node": "^0.52.0"
"@tachybase/opentelemetry-instrumentation-http": "^0.1.0"
}, },
"files": [ "files": [
"build/src/**/*.js", "build/src/**/*.js",

View File

@ -1,12 +1,12 @@
{ {
"name": "@tachybase/opentelemetry-instrumentation-http", "name": "@tachybase/opentelemetry-instrumentation-http",
"version": "0.1.0", "version": "0.0.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@tachybase/opentelemetry-instrumentation-http", "name": "@tachybase/opentelemetry-instrumentation-http",
"version": "0.1.0", "version": "0.0.1",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@opentelemetry/core": "1.25.1", "@opentelemetry/core": "1.25.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@tachybase/opentelemetry-instrumentation-http", "name": "@tachybase/opentelemetry-instrumentation-http",
"version": "0.1.0", "version": "0.0.1",
"description": "OpenTelemetry instrumentation for `node:http` and `node:https` http client and server modules for TachyBase", "description": "OpenTelemetry instrumentation for `node:http` and `node:https` http client and server modules for TachyBase",
"author": "TachyBase Team", "author": "TachyBase Team",
"homepage": "https://git.daoyoucloud.com/TomyJan/opentelemetry-auto-instrumentations/plugins/node/opentelemetry-instrumentation-http", "homepage": "https://git.daoyoucloud.com/TomyJan/opentelemetry-auto-instrumentations/plugins/node/opentelemetry-instrumentation-http",
@ -78,7 +78,6 @@
"semver": "^7.5.2" "semver": "^7.5.2"
}, },
"files": [ "files": [
"build/package.json",
"build/src/**/*.js", "build/src/**/*.js",
"build/src/**/*.js.map", "build/src/**/*.js.map",
"build/src/**/*.d.ts", "build/src/**/*.d.ts",

View File

@ -773,8 +773,6 @@ export class HttpInstrumentation extends InstrumentationBase<HttpInstrumentation
* If a parent is required but not present, we use a `NoopSpan` to still * If a parent is required but not present, we use a `NoopSpan` to still
* propagate context without recording it. * propagate context without recording it.
*/ */
// 修改 name 加上具体的 route
name = `${name} ${options.attributes?.[SEMATTRS_HTTP_ROUTE] ?? ''}`;
const requireParent = const requireParent =
options.kind === SpanKind.CLIENT options.kind === SpanKind.CLIENT
? this.getConfig().requireParentforOutgoingSpans ? this.getConfig().requireParentforOutgoingSpans