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

feat: upgrade logger (PL-000) #692

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

trs
Copy link
Collaborator

@trs trs commented Feb 5, 2024

Upgrade @voiceflow/logger, @voiceflow/backend-utils

@trs trs force-pushed the trs/upgrade-logger/PL-000 branch from 62b51f5 to 9259de1 Compare February 6, 2024 18:39
Copy link

sonarcloud bot commented Feb 6, 2024

@DecathectZero
Copy link
Member

I think req.url is actually the wrong value for express. We actually need to use req.originalUrl because there's some kind of transformation after going through a route. Usually what I see with the inline setting is:
POST /65ef59c094d87bb9c91b803a (::ffff:127.0.0.1:51901) and it's missing the /interact in the front.
https://github.com/voiceflow/logger/blob/9f5e6c763cb56cc880c8187927e7f129629ac61a/src/http.logger.ts#L24-L27

https://github.com/pinojs/pino-http/blob/00b097bb54d87ec6ba27d92b4bd1612213e75def/logger.js#L133
pinojs/pino-http#73 (comment)

@DecathectZero DecathectZero self-requested a review March 12, 2024 07:05
Copy link
Member

@DecathectZero DecathectZero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some changes might need to get made to the way promises are displayed. The only method with vars was actually pretty good:
https://github.com/voiceflow/logger/blob/3f4220c97ffa69351a3058d2000fa55547d90a91/lib/logger.ts#L78-L89

correct expectations:
Screenshot 2024-03-12 at 3 06 31 AM

bors-vf bot pushed a commit that referenced this pull request Mar 12, 2024
I played around a lot with the logger, and I think this is the minimal risk one to solve the memory issue.
This doesn't change anything with `backend-utils` and ensures the same logging behavior with `vars`:
https://github.com/voiceflow/logger/blob/3f4220c97ffa69351a3058d2000fa55547d90a91/lib/logger.ts#L70-L89

added pino as a dev dependency PURELY for types, because `@voiceflow/backend-utils` uses a different version of pino and pino http.

The longer term update is over here:
#692 (review)

Co-authored-by: Tyler Han <tylerhan97@gmail.com>
bors-vf bot pushed a commit that referenced this pull request Mar 12, 2024
I played around a lot with the logger, and I think this is the minimal risk one to solve the memory issue.
This doesn't change anything with `backend-utils` and ensures the same logging behavior with `vars`:
https://github.com/voiceflow/logger/blob/3f4220c97ffa69351a3058d2000fa55547d90a91/lib/logger.ts#L70-L89

added pino as a dev dependency PURELY for types, because `@voiceflow/backend-utils` uses a different version of pino and pino http.

The longer term update is over here:
#692 (review)

Co-authored-by: Tyler Han <tylerhan97@gmail.com>
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

Successfully merging this pull request may close these issues.

None yet

2 participants