Skip to content

Commit

Permalink
don't trace requests to health endpoint (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlazingAsher authored Jul 23, 2024
1 parent b0e1a71 commit c801a26
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/tracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ export const init = (serviceName: string) => {

registerInstrumentations({
instrumentations: [
new HttpInstrumentation(),
new HttpInstrumentation({
ignoreIncomingRequestHook(req) {
return req.url?.startsWith('/health') ?? false;
}
}),
new ExpressInstrumentation(),
new MongoDBInstrumentation()
]
Expand Down

0 comments on commit c801a26

Please sign in to comment.