Skip to content

Requests made using fetch() not being traced #161

@cer

Description

@cer

It would be great to get some advice. Thanks.

Problem:

  • Requests made by NextAuth to the OAuth2 Authorization Server are traced correctly
  • Requests made from application code using fetch():
    • Mac OS: works correctly
    • Container image running node:22-slim: not traced

This is instrumentation.ts:

import { registerOTel } from '@vercel/otel'

export function register() {
  registerOTel({ serviceName: 'next-app',
    instrumentationConfig: {
      fetch: {
        propagateContextUrls: [
          /.*/,
        ]
      }
    }
  })

}

Platforms: container image node:22-slim

$ node -v
v22.14.0

package.json::

  "dependencies": {
    "next": "15.2.2",
    "next-auth": "^4.24.5",
    "@vercel/otel": "^1.13.0",
    "@opentelemetry/api": "^1.9.0",
    "@opentelemetry/api-logs": "^0.57.2",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions