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

DEVPROD-7663: Add grip statements to track Image Visibility API errors #8488

Merged
merged 7 commits into from
Nov 21, 2024

Conversation

minnakt
Copy link
Contributor

@minnakt minnakt commented Nov 19, 2024

DEVPROD-7663

Description

Add grip errors for:

  • error accessing API
  • error unmarshalling results from API

This will be used to configure a new Splunk alert.

Tagging app because I think you can tell me better on how grip alerts should look like 😅

Testing

  • Manually triggered errors on Splunk Staging and verified they were logged

@minnakt minnakt marked this pull request as ready for review November 19, 2024 16:47
@minnakt minnakt requested a review from a team November 19, 2024 16:47
thirdparty/runtime_environments.go Outdated Show resolved Hide resolved
thirdparty/runtime_environments.go Show resolved Hide resolved
thirdparty/runtime_environments.go Show resolved Hide resolved
* Just use status code in grip
* Add consistent field
* Don't wrap error when there is no error
@minnakt minnakt requested a review from ablack12 November 20, 2024 16:43
Copy link
Contributor

@ablack12 ablack12 left a comment

Choose a reason for hiding this comment

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

Quick question -- do you know if we're already logging errors related to this at the error level? In that case, I think we should reduce all of these logs to the debug level -- otherwise, we're double counting errors, which can be annoying for our elevated error rate alert.

}
toolchains := &APIToolchainResponse{}
if err := gimlet.GetJSON(resp.Body, &toolchains); err != nil {
grip.Error(message.WrapError(err, message.Fields{
"message": "parsing response from image visibility API",
"reason": "runtime environments API alerting",
Copy link
Contributor

Choose a reason for hiding this comment

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

actually tiny nit -- since this is consistent, I'd recommend making this a constant at the top of the file, like this

@minnakt minnakt merged commit e25005f into evergreen-ci:main Nov 21, 2024
10 checks passed
@minnakt minnakt deleted the DEVPROD-7663 branch November 21, 2024 23: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.

2 participants