-
Notifications
You must be signed in to change notification settings - Fork 157
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
chore(logs): improve log messages #413
base: main-enterprise
Are you sure you want to change the base?
chore(logs): improve log messages #413
Conversation
@martinm82 I think it looks good, but what about duplicate keys for Maybe a good thing could be to use different property names for the context? I interpret the It makes sense to have a logger context/name that matches the source code filename. Also adding But most valueable to me when doing log diving is to have a trace id around. In the context of Safe Settings it would be really great to have the github delivery id on every log record: Sometimes you have to debug timeouts in the webhook delivery log and you wonder what actually happened in the Safe Settings end. Did the request get processed and/or did the lambda start? Maybe the request took too long time to complete? The delivery ID could be populated in a "root logger" in the event handler / index.js. Each plugin could create a child logger from that (passed via the constructor) and further on utility modules like mergedeep can create their child loggers from the plugin loggers. What do you think? |
d900367
to
0462191
Compare
Indeed, haven't thought about the duplicates. Will extend a bit the implementation and incorporate this.
With central logging systems (e.g. DataSet) one can use queries like
I agree but maybe we could tackle this in a separate PR, WDYT? |
@@ -303,7 +303,7 @@ ${this.results.reduce((x, y) => { | |||
return childPlugins | |||
} | |||
|
|||
validate (section, baseConfig, overrideConfig) { | |||
validate (repoName, section, baseConfig, overrideConfig) { |
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 seems unused to me. Maybe I'm missing something here :)
While debugging the app I have been struggling a lot with figuring out from where the logs were coming from. We are using a central logging system (DataSet) where logs can be easily queried and filtered.
For that purpose I have started to use the
child
method of thepino
logger used by the Probot app to add additional attributes in the log messages.Let me know what you think about this.