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

PR #272 continued #283

Merged
merged 4 commits into from
Jan 10, 2020
Merged

PR #272 continued #283

merged 4 commits into from
Jan 10, 2020

Conversation

matthiasr
Copy link
Contributor

Picking up #272 to get it over the finish line:

  • fix the build issues
  • convert panics to log+exit (missed this in initial review)

cc @mhartenbower

mhartenbower and others added 4 commits October 13, 2019 13:19
Fixes #270

Signed-off-by: mhartenbower <matt.hartenbower@gmail.com>
Signed-off-by: mhartenbower <matt.hartenbower@gmail.com>
Signed-off-by: Matthias Rampke <mr@soundcloud.com>
Following the lead of prometheus/prometheus, we prefer to log-and-exit
instead of an unstructured panic.

cf. https://github.com/prometheus/prometheus/pull/3061/files#diff-4a3ccbb3ebdcd530af96f0105fe833c2R182

Signed-off-by: Matthias Rampke <mr@soundcloud.com>
@matthiasr
Copy link
Contributor Author

note for the changelog: the logger change is only mildly breaking – the valid values for --logger.format have changed ([logfmt, json]) and the fatal log level is no longer valid.

@brian-brazil
Copy link
Contributor

👍

level.Error(logger).Log("msg", "error dumping FSM", "error", err)
// Failure to dump the FSM is an error (the user asked for it and it
// didn't happen) but not fatal (the exporter is fully functional
// afterwards).
Copy link
Contributor

Choose a reason for hiding this comment

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

As an aside, should this always exit anyway? This sounds more like a tool than what a daemon should do in passing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm it could, yeah, although then I'd prefer to start a mapper CLI which could also do config validation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cf. #263

@matthiasr matthiasr merged commit 4f82807 into master Jan 10, 2020
@matthiasr matthiasr deleted the mr/pr-272 branch January 10, 2020 14:34
matthiasr pushed a commit that referenced this pull request Jan 10, 2020
Signed-off-by: Matthias Rampke <mr@soundcloud.com>
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