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

pyroscope.scrape: change error log level to not swallow errors #5840

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion component/pyroscope/scrape/scrape_loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func (t *scrapeLoop) scrape() {
}
}
if err := t.fetchProfile(scrapeCtx, profileType, buf); err != nil {
level.Debug(t.logger).Log("msg", "fetch profile failed", "target", t.Labels().String(), "err", err)
level.Error(t.logger).Log("msg", "fetch profile failed", "target", t.Labels().String(), "err", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

It makes sense to report this, but if the log line is expected to be printed a lot maybe this should be a metric? That way we can have an alert as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lets try like this in dev and then revert and make it metric when we have them too much.

Also do you know if scraping metric produces error? It feels they should be aligned and have similar experience.

t.updateTargetStatus(start, err)
return
}
Expand Down