Using `@effect/opentelemetry` with Next.js for OTel Node SDK Initialization
Question about
Vercel has added an instrumentation hook to Next.js: https://vercel.com/docs/observability/otel-overview/quickstart
I would like to use it to initialize the OTel Node SDK, which I do now in a file
Afaict the only thing I would need to do is import this, get the
I found the
@effect/opentelemetry and Next.js: Vercel has added an instrumentation hook to Next.js: https://vercel.com/docs/observability/otel-overview/quickstart
I would like to use it to initialize the OTel Node SDK, which I do now in a file
otel.node.ts: Afaict the only thing I would need to do is import this, get the
NodeTracerProvider from inside the Layer, and call .register() on it in the instrumentation callback. However, I can't quite figure out how to get the NodeTracerProvider. Did someone manage to successfully set up @effect/opentelemetry for Next.js?I found the
Tracer.TracerProvider tag, but that doesn't yield the NodeTracerProvider. and besides NodeSdk.layer also doesn't provide the NodeTracerProvider.