dd-trace 5.61.0 → 5.61.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dd-trace",
3
- "version": "5.61.0",
3
+ "version": "5.61.1",
4
4
  "description": "Datadog APM tracing client for JavaScript",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -146,7 +146,7 @@ function createWrapRouterMethod (name) {
146
146
  }
147
147
 
148
148
  if (routeAddedChannel.hasSubscribers) {
149
- routeAddedChannel.publish({ topOfStackFunc: methodWithTrace, layer: this.stack[0] })
149
+ routeAddedChannel.publish({ topOfStackFunc: methodWithTrace, layer: this.stack.at(-1) })
150
150
  }
151
151
 
152
152
  if (this.stack.length > offset) {