Skip to content

Duplicate http.server.middleware spans emitted for Next.js middleware #22636

Description

@chargome

Description

Our nextjs sdk emits two http.server.middleware spans for a single middleware request:

  • Parent (is_segment: true / is_transaction: true): name middleware GET <route> - the OTel Middleware.execute transaction (correct).
  • Child: name http.server.middleware, description middleware, origin auto.function.nextjs.wrap_middleware- redundant, overlaps the parent, no useful attributes or children.

This affects webpack only as we do not instrument middleware on turbopack.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions