-
Notifications
You must be signed in to change notification settings - Fork 23
Log attribute fixes #58
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
Conversation
|
I kept getting issues in the backend service that it was missing the lograge game. I tried to rebuild with no cache but still got that issue. Any ideas? |
@arosenkranz can you trying blowing out your volumes via |
arosenkranz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good! I can start a new branch that removes the bundle cache mount for the backend service, as I have some other changes to make to the docker-compose file to bring better parity between this repo and what we use in labs.
I think the solution for removing the next-commerce:<command> in the frontend logs is to move away from the monorepo setup and integrate those packages into the frontend service, which I think would increase the scope of work in a way that we should just start a new branch for it.
Description
This PR adds JSON log formatters to frontend, backend, ads, and discounts. This allows DD attributes to be extracted easily inside the app.
For testing purposes, I enabled the Ads error feature flag so the stack trace will be visible in the logs
Additionally, I verified that the ads and discount logs are not being truncated. The standard logger that comes with
werkzeug(python util library used by Flask) is built using the log format127.0.0.1 - - [01/Mar/2022 12:35:19] "GET / HTTP/1.1" 200 -Ref: https://circleci.com/blog/application-logging-with-flask/
Motivation
https://datadoghq.atlassian.net/browse/WEB-4090
How to test
If possible, it's easier to start from a new baseline and destroy all old docker images / volumes with
docker system prune -a --volumesmake local-startLog examples
Backend attributes extracted
Ads service with multi-line log + stack trace
Frontend multi-line log