Re: <https://signoz.io/docs/instrumentation/opente...
# support
z
Re: https://signoz.io/docs/instrumentation/opentelemetry-nextjs/ https://github.com/SigNoz/sample-nextjs-app Is anyone aware how to get this to work with a TS standalone build of a nextjs app?
Copy code
next build
Seems to be breaking the import-in-the-middle that
Copy code
NODE_OPTIONS: "--require=@opentelemetry/auto-instrumentations-node/register"
requires. I also see
Copy code
experimental-loader=@opentelemetry/instrumentation/hook.mjs
per https://github.com/open-telemetry/opentelemetry-js/blob/4b5c21cede4ccbe2529f57ee61f1913b2a31ba20/doc/esm-support.md#instrumentatio[…]equired-for-esm but that is nowhere in my container.
I am trying to debug some traces in my production app, everything works fine locally, but when I containerize it with:
Copy code
...
COPY apps/webservice/package.json ./apps/webservice/package.json

RUN pnpm install --frozen-lockfile
COPY . .

RUN turbo build --filter=...@ctrlplane/webservice

FROM base AS runner
WORKDIR /app

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nodejs
USER nodejs

COPY --from=installer --chown=nodejs:nodejs /app/apps/webservice/.next/standalone ./
COPY --from=installer --chown=nodejs:nodejs /app/apps/webservice/.next/static ./apps/webservice/.next/static
COPY --from=installer --chown=nodejs:nodejs /app/apps/webservice/public ./apps/webservice/public

EXPOSE 3000

ENV PORT=3000
ENV AUTH_TRUST_HOST=true
ENV NODE_ENV=production
ENV NODE_PATH=/app/apps/webservice/node_modules
ENV HOSTNAME=0.0.0.0

CMD ["node", "apps/webservice/server.js"]
I drop a bunch of traces, specifically the pg and pg.pool traces I am interested in.
If someone just has an example, I would be very appreciative 🙏
@Vishal Sharma, Since you created the example repo, I am curious if you also ran into issues. Or if containerization was never in scope like it was for https://github.com/SigNoz/sample-nodejs-app.
v
Containerization was not in scope when I was adding example
z
If you ever attempt it, please reach out. 🙏