Compare commits
2 Commits
f96a636780
...
61a80e447c
Author | SHA1 | Date | |
---|---|---|---|
61a80e447c | |||
2a0cf298f4 |
12
package-lock.json
generated
12
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@tachybase/opentelemetry-auto-instrumentations",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@tachybase/opentelemetry-auto-instrumentations",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"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.1.0"
|
||||
"@tachybase/opentelemetry-instrumentation-http": "^0.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@opentelemetry/api": "^1.4.1",
|
||||
@ -3933,9 +3933,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@tachybase/opentelemetry-instrumentation-http": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@tachybase/opentelemetry-instrumentation-http/-/opentelemetry-instrumentation-http-0.1.0.tgz",
|
||||
"integrity": "sha512-e8Ie6yTDy+qkedfGPLKpYj4n/30KrbJSNuVm9HsMjuq95SCe1GFVCIU1e0I9lkOeveUqCSk/n/R6OQa0pI1Rbg==",
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@tachybase/opentelemetry-instrumentation-http/-/opentelemetry-instrumentation-http-0.1.1.tgz",
|
||||
"integrity": "sha512-umOA03bmtJQk1mRBogBpCG8ewtPs2xLhsiUsJUpaYxV/BsbYPxpx0IE7+Ms4mGZPbVoiWtf9Nqu5to5Eq38A4w==",
|
||||
"dependencies": {
|
||||
"@opentelemetry/core": "1.25.1",
|
||||
"@opentelemetry/instrumentation": "0.52.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tachybase/opentelemetry-auto-instrumentations",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"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",
|
||||
@ -105,7 +105,7 @@
|
||||
"@opentelemetry/resource-detector-gcp": "^0.29.10",
|
||||
"@opentelemetry/resources": "^1.24.0",
|
||||
"@opentelemetry/sdk-node": "^0.52.0",
|
||||
"@tachybase/opentelemetry-instrumentation-http": "^0.1.0"
|
||||
"@tachybase/opentelemetry-instrumentation-http": "^0.1.1"
|
||||
},
|
||||
"files": [
|
||||
"build/src/**/*.js",
|
||||
|
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@tachybase/opentelemetry-instrumentation-http",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@tachybase/opentelemetry-instrumentation-http",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@opentelemetry/core": "1.25.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tachybase/opentelemetry-instrumentation-http",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"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",
|
||||
|
@ -774,7 +774,12 @@ export class HttpInstrumentation extends InstrumentationBase<HttpInstrumentation
|
||||
* propagate context without recording it.
|
||||
*/
|
||||
// 修改 name 加上具体的 route
|
||||
name = `${name} ${options.attributes?.[SEMATTRS_HTTP_ROUTE] ?? ''}`;
|
||||
name = `${name} ${options.attributes?.[SEMATTRS_HTTP_ROUTE] ?? options.attributes?.['http.target'] ?? ''}`;
|
||||
// 删除 url 中的 query
|
||||
const queryIndex = name.indexOf('?');
|
||||
if (queryIndex !== -1) {
|
||||
name = name.slice(0, queryIndex);
|
||||
}
|
||||
const requireParent =
|
||||
options.kind === SpanKind.CLIENT
|
||||
? this.getConfig().requireParentforOutgoingSpans
|
||||
|
Loading…
Reference in New Issue
Block a user