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

chore: replace info-level logs with debug #116

Merged
merged 4 commits into from
Nov 26, 2024

Conversation

melisaguevara
Copy link
Contributor

@melisaguevara melisaguevara commented Nov 25, 2024

In order to use UMA's logger to send logs to slack, we should reduce the number of info logs in the indexer.

This PR:

  • Replaces almost all info logs with debug logs
  • For error-level logs, it sets the notificationPath key to "across-indexer-error" so that those are sent to a error specific channel.
  • Adds the "Indexer" or "IndexerAPI" prefix to the "at" value of all logs so that we can easily filter in GCP and exclude SDK logs.

Zion PR to config slack channels: https://github.com/UMAprotocol/zion/pull/429

Copy link

linear bot commented Nov 25, 2024

@melisaguevara melisaguevara requested review from amateima, daywiss and james-a-morris and removed request for amateima and daywiss November 25, 2024 23:04
@@ -28,8 +28,9 @@ async function initializeRedis(

redis.on("error", (err) => {
logger.error({
at: "Indexer-API",
at: "IndexerAPI",
Copy link
Contributor

Choose a reason for hiding this comment

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

We may want to specify what the function is. I.e. IndexerAPI#main

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done here b59aa5c

message: "No executed bundles found",
at: "resolveMostRecentProposedAndExecutedBundles",
notificationPath: "across-indexer-error",
Copy link
Contributor

Choose a reason for hiding this comment

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

ooc what is a notificationPath in this case?

Copy link
Contributor Author

@melisaguevara melisaguevara Nov 26, 2024

Choose a reason for hiding this comment

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

This is the key we use to send Slack messages to a specific channel.
Its value has to be part of the escalationPathWebhookUrls object in the SLACK_CONFIG env var.
Here's our config: https://github.com/UMAprotocol/zion/pull/429/files
We'll have a default channel for info and warns, and other channel just for errors

@melisaguevara melisaguevara merged commit f2b8e95 into master Nov 26, 2024
3 checks passed
@melisaguevara melisaguevara deleted the mguevara/acx-3359-post-errors-on-slack branch December 3, 2024 14:13
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.

3 participants