Skip to content

Commit

Permalink
fix(apm): Set op in node http.server transaction (#2496)
Browse files Browse the repository at this point in the history
* fix: Set op in transation

* meta: Changelog
  • Loading branch information
HazAT committed Mar 13, 2020
1 parent 13ab8e5 commit 81732c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- [apm] fix: Use Performance API for timings when available, including Web Workers (#2492)
- [apm] fix: Remove Performance references (#2495)
- [apm] fix: Set `op` in node http.server transaction (#2496)

## 5.14.1

Expand Down
5 changes: 4 additions & 1 deletion packages/node/src/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ export function tracingHandler(): (

const hub = getCurrentHub();
const transaction = hub.startSpan({
transaction: `${reqMethod}|${reqUrl}`,
op: 'http.server',
transaction: `${reqMethod} ${reqUrl}`,
});

hub.configureScope(scope => {
scope.setSpan(transaction);
});

res.once('finish', () => {
transaction.setHttpStatus(res.statusCode);
transaction.finish();
Expand Down

0 comments on commit 81732c5

Please sign in to comment.