-
Notifications
You must be signed in to change notification settings - Fork 49
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: more logs for extension and notification apps #1183
Conversation
a5bb908
to
a677e53
Compare
@jhilden @lojzatran @emmenko @logeecom, Will some of you have some time to look at it? |
Hello @Krysik Our team will look into this and get back to you. Best regards. |
4b091dc
to
7af242d
Compare
@logeecom any update on this PR? |
Hey, New version 11.5.7 has been released https://github.com/Adyen/adyen-commercetools/releases/tag/v11.5.7 Best regards. |
notification, | ||
enableHmacSignature, | ||
ctpProjectConfig, | ||
) { | ||
const logger = mainLogger.child({ | ||
logger |
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.
breaking change, that parameter is not provided for serverless setup, for example aws lambda (notification/index.lambda.js)
Hey @vasily-polonsky We wanted to inform you that our team has added the logger parameter for serverless and resolved the issue. The new plugin version 11.5.10 has been released https://github.com/Adyen/adyen-commercetools/releases/tag/v11.5.10. Best regards. |
Summary
The motivation behind this PR is that I would like to observe better what's going on in the extension and notification applications. I would like to track a whole request path by request id and have a response time.
In my PR I inject a logger instead of importing it from utils. The injected logger has a context of the request, it contains information about the requesting path, used HTTP method, and request id. In my opinion, it's better to have a context instead of a raw logger without anything.
Also, I changed the notification handler to accept an object. This approach is more flexible in case of adding new things in the future and it provides more context for the developer, especially for the boolean values, now you don't have to remember the order of the arguments.
Tested scenarios
Not much to test here, I added logs 😉😄