fix(root): add hyperdx and better logging
This commit is contained in:
committed by
Carl-Gerhard Lindesvärd
parent
4bafa16419
commit
c819c18962
@@ -1,9 +1,10 @@
|
||||
/* eslint-disable */
|
||||
|
||||
export async function register() {
|
||||
if (
|
||||
process.env.NODE_ENV === 'production' &&
|
||||
process.env.NEXT_RUNTIME === 'nodejs'
|
||||
) {
|
||||
if (process.env.NEXT_RUNTIME === 'nodejs' && process.env.HYPERDX_API_KEY) {
|
||||
const { initSDK } = await import('@hyperdx/node-opentelemetry');
|
||||
initSDK({
|
||||
consoleCapture: true,
|
||||
apiKey: process.env.HYPERDX_API_KEY,
|
||||
service: 'dashboard',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user