Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registering a LogRecordProcessor throws an exception #104

Open
mburumaxwell opened this issue Jul 2, 2024 · 1 comment
Open

Registering a LogRecordProcessor throws an exception #104

mburumaxwell opened this issue Jul 2, 2024 · 1 comment

Comments

@mburumaxwell
Copy link

mburumaxwell commented Jul 2, 2024

Registering a LogRecordProcessor throws an exception reading:

An error occurred while loading instrumentation hook: Cannot read properties of undefined (reading 'attributeCountLimit')

This was possibly introduced in open-telemetry/opentelemetry-js#4564. Upgrading @opentelemetry/sdk-logs seems to fix the issue but only if you do not pass anything to logRecordProcessor and instead create your own logRecordProcessor and pass a resource and empty value for logRecordLimits.

This only happens on the edge runtime, at runtime (not build), when there is a middleware.ts file (NextJS), and using SimpleLogRecordProcessor,

Updating the range for peer dependencies in #89 seems to have solved the warnings from package managers during installation but not actual logic changes.

@shawnmclean
Copy link

shawnmclean commented Nov 25, 2024

I'm getting this error just by instantiating a LoggerProvider in the edge runtime.

Does anyone know how to setup a logger with vercel otel?

I'm fine with pino, winston or even rolling my own.

"@opentelemetry/sdk-logs": "0.55.0",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants