-
Notifications
You must be signed in to change notification settings - Fork 16
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
fixed slack interval and new error msg #322
Conversation
core/src/utils.ts
Outdated
const webhook = new IncomingWebhook(SLACK_WEBHOOK_URL) | ||
const text = ` :fire: _An error has occurred at_ \`${os.hostname()}\`\n \`\`\`${JSON.stringify( | ||
error | ||
error[1] |
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.
@joseph-bisonai What is stored in the first field of error
?
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.
From this PR, you started treating it differently than before so I am curious. It could be a bit better to define the value somewhere in advance because it is reused at many places. E.g.:
const e = error[1]
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.
Since the logger is changed to PINO, an error message differs from the previous error message. PINO logger has another array at index [0], which is unnecessary.
So I decided to bring only Index[1] contents.
For reusing the value defining a value is okay. I will change it.~
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.
Great! Thank you for the explanation!
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.
LGTM!
Description
Slack alarm call with unlimited time of interval issue.
Fixes # (issue)
This adds a feature of interval 1 min to send slack alarm notifications.
If the error message is different, it sends without an interval period.
Type of change
Please delete options that are not relevant.
Checklist before requesting a review
Deployment