Skip to content

Types from fastify devDependency should not be imported in index.d.ts #32

Open
@onurtemizkan

Description

@onurtemizkan

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

5

Plugin version

0.5.0

Node.js version

20.18.2

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

15.3.2

Description

We bumped into this while trying to migrate Sentry's Node SDK to use this plugin. getsentry/sentry-javascript#15542

As fastify is declared as a devDependency of this plugin, it's not guaranteed to be available every time this package @fastify/otel is depended on.

This should be ok when @fastify/otel is used directly inside a fastify application, as it's available regardless.

But, to be able to ship @fastify/otel as a part of Sentry's NodeJS SDK, we need to depend on @fastify/otel like the other OpenTelemetry plugins. This breaks the usage of the SDK, where fastify is unavailable.

Link to code that reproduces the bug

CI-run: https://github.com/getsentry/sentry-javascript/actions/runs/14088564105/job/39459459303

Expected Behavior

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions