We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27d6503 commit 089a228Copy full SHA for 089a228
plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts
@@ -197,7 +197,13 @@ export class ExpressInstrumentation extends InstrumentationBase {
197
] as ExpressLayerType;
198
199
const rpcMetadata = getRPCMetadata(context.active());
200
- if (rpcMetadata?.type === RPCType.HTTP) {
+ if (
201
+ rpcMetadata?.type === RPCType.HTTP
202
+ && (
203
+ !rpcMetadata.route
204
+ || rpcMetadata?.route?.length < route?.length
205
+ )
206
+ ) {
207
rpcMetadata.route = route || '/';
208
}
209
0 commit comments