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