-
Notifications
You must be signed in to change notification settings - Fork 43
Make noisy logs debug only #1376
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
base: master
Are you sure you want to change the base?
Make noisy logs debug only #1376
Conversation
qtomlinson
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.
The three definition related functionalities of the API service are: retrieving (‘computed definition available’), computing (‘recomputed definition available’), and harvesting (‘definition not available’) definitions. Would it be possible to update the query logic in statusService to preserve the metrics?
I’ve noticed there are currently some duplicate logging entries in Application Insights. Reducing these duplicates would not only improve clarity but also help lower our monitoring costs.
| _getStatusLookup() { | ||
| return { | ||
| requestcount: this._requestCount, | ||
| definitionavailability: this._definitionAvailability, |
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 is used in our ui, see https://dev.clearlydefined.io/status
| this.logger.debug('definition harvest in progress', { coordinates: coordinates.toString() }) | ||
| } else { | ||
| // Log line used for /status page insights | ||
| this.logger.info('computed definition available', { coordinates: coordinates.toString() }) |
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.
as per the comment online 105, 'computed definition available' is used as a metric for our status page.
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.
I created clearlydefined/website#1076 to remove the chart as well.
I investigated this but couldn't figure out why it was happening :(. Because 94% of logs are these lines this does end up being more impactful than removing the doubling, but I would have liked to have done both. |
These two log-points account for ~94% of total AppInsights logs, which can add up to significant infrastructure spend. By moving them to the debug level we can avoid those costs for the modest trade-off of one of the status sub-functions (the query for which could probably be re-worked to account for their absence by someone more knowledgeable).