Skip to content

Commit

Permalink
build: add register instrumentations (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianlnf authored Jan 27, 2025
1 parent 911609f commit 9cb078e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/instrumentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const {
hostDetector
} = require('@opentelemetry/resources')
const { diag, DiagLogLevel, DiagConsoleLogger } = require('@opentelemetry/api')
const { registerInstrumentations } = require('@opentelemetry/instrumentation')

const pkg = require('../package.json')

Expand Down Expand Up @@ -76,7 +77,9 @@ const sdk = new NodeSDK({
}
})
}),
instrumentations: [getNodeAutoInstrumentations()]
instrumentations: registerInstrumentations({
instrumentations: getNodeAutoInstrumentations()
})
})

if (diagnosticsEnabled) {
Expand Down

0 comments on commit 9cb078e

Please sign in to comment.