add baselime to nextjs
This commit is contained in:
committed by
Carl-Gerhard Lindesvärd
parent
ac84adf1a4
commit
dd53a5757a
21
apps/dashboard/src/instrumentation.ts
Normal file
21
apps/dashboard/src/instrumentation.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
/* eslint-disable */
|
||||
|
||||
export async function register() {
|
||||
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
||||
const { BaselimeSDK, VercelPlugin, BetterHttpInstrumentation } =
|
||||
// @ts-expect-error
|
||||
await import('@baselime/node-opentelemetry');
|
||||
|
||||
const sdk = new BaselimeSDK({
|
||||
serverless: true,
|
||||
service: 'vercel-coderaxs-projects-d46dc62b',
|
||||
instrumentations: [
|
||||
new BetterHttpInstrumentation({
|
||||
plugins: [new VercelPlugin()],
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
sdk.start();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user