Skip to content

Registering a LogRecordProcessor throws an exception #104

@mburumaxwell

Description

@mburumaxwell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions