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 30e8fc5 commit 60157a0Copy full SHA for 60157a0
plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts
@@ -186,7 +186,13 @@ export class ExpressInstrumentation extends InstrumentationBase<ExpressInstrumen
186
] as ExpressLayerType;
187
188
const rpcMetadata = getRPCMetadata(context.active());
189
- if (rpcMetadata?.type === RPCType.HTTP) {
+ if (
190
+ rpcMetadata?.type === RPCType.HTTP
191
+ && (
192
+ !rpcMetadata.route
193
+ || rpcMetadata?.route?.length < route?.length
194
+ )
195
+ ) {
196
rpcMetadata.route = route || '/';
197
}
198
0 commit comments