-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
Is there any way to debug the instrumentation script?
I'm trying to add logging in this way:
import { registerOTel, OTLPHttpProtoTraceExporter } from "@vercel/otel";
import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-proto';
import { SimpleLogRecordProcessor, LoggerProvider } from '@opentelemetry/sdk-logs';
export function register() {
const loggerProvider = new LoggerProvider();
const logExporter = new OTLPLogExporter({
url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT,
});
const logRecordProcessor = new SimpleLogRecordProcessor(logExporter);
loggerProvider.addLogRecordProcessor(logRecordProcessor);
registerOTel({
serviceName: "service-name",
traceExporter: new OTLPHttpProtoTraceExporter({
url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT,
}),
logRecordProcessor,
});
}The application deployment works, but when I open a preview, the application looks broken and for some reason have CSS for some reason. When I comment out logging, the app works again. There's no logs for instrumentation.ts anywhere in the Vercel dashboard or in terminal.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels