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: proper logging for protocol health monitoring with Sentry #14072

Merged
merged 12 commits into from
Jun 21, 2024

Conversation

clemsos
Copy link
Member

@clemsos clemsos commented Jun 19, 2024

Description

This adds a more refined and useful way to log various protocol checks to Sentry (and then fwd them to discord etc)

Issues

Fixes #
Refs #

Checklist:

  • 1 PR, 1 purpose: my Pull Request applies to a single purpose
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the docs to reflect my changes if applicable
  • I have added tests (and stories for frontend components) that prove my fix is effective or that my feature works
  • I have performed a self-review of my own code
  • If my code involves visual changes, I am adding applicable screenshots to this thread

Release Note Draft Snippet

@clemsos clemsos requested a review from julien51 June 19, 2024 14:36
@cla-bot cla-bot bot added the cla-signed label Jun 19, 2024
Copy link
Member Author

Choose a reason for hiding this comment

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

There are several logger.js files with duplicate code but as we discussed , it may be easier to have these for now than to introduce another package just to hold that bit of code.

@clemsos
Copy link
Member Author

clemsos commented Jun 19, 2024

relates to #13917

console.log(`${symbols[level] || ''}[${level}]: ${msg}`)

// send to sentry
if (process.env.SENTRY_DSN) {
Copy link
Member Author

Choose a reason for hiding this comment

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

logs will be sent to sentry only if SENTRY_DSN is exported to the shell. Should document this maybe but not sure where ?

Copy link
Member

Choose a reason for hiding this comment

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

I think that's ok.

@clemsos clemsos changed the title chore: proper login for protocol health monitoring with Sentry chore: proper logging for protocol health monitoring with Sentry Jun 20, 2024
console.log(`${symbols[level] || ''}[${level}]: ${msg}`)

// send to sentry
if (process.env.SENTRY_DSN) {
Copy link
Member

Choose a reason for hiding this comment

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

I think that's ok.

subgraph/bin/check.js Outdated Show resolved Hide resolved
@clemsos clemsos merged commit 126c9d1 into master Jun 21, 2024
13 checks passed
@clemsos clemsos deleted the sentry-health-logging branch June 21, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants