Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional fields not showing in the log object #26

Closed
hanieljazzar opened this issue Mar 5, 2024 · 3 comments
Closed

Additional fields not showing in the log object #26

hanieljazzar opened this issue Mar 5, 2024 · 3 comments

Comments

@hanieljazzar
Copy link

I'm trying to add some fields to the global log, tried in both base and mixin, but the fields only get added locally, but when we deploy to a docker container, they don't show (the default json logs show though). And if I try to make a child, the fields get added under message instead of the higher level log object. Any ideas what can be done to add the fields after deployment to the higher level object?

image

@hanieljazzar
Copy link
Author

false alarm, was a docker file issue, apologies about that

@davecowart
Copy link

@hanieljazzar what was your dockerfile issue? I'm running into something very similar.

@davecowart
Copy link

Ended up figuring out my issue. I'm making a standalone build using next.js 14.2 in a multi-stage Dockerfile, so I needed to:

  • make sure next-logger.config.js was copied to the runtime image, in the same folder as server.js
  • include next-logger and pino in serverComponentsExternalPackages in next.config.js (even though they're imported in the instrumentation file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants