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

Rework logging throughout the code. #1479

Open
beorn7 opened this Issue Mar 9, 2016 · 8 comments

Comments

Projects
None yet
4 participants
@beorn7
Copy link
Member

beorn7 commented Mar 9, 2016

There are two aspects of this:

@beorn7

This comment has been minimized.

Copy link
Member Author

beorn7 commented Apr 25, 2016

Most (if not all) warnings and errors should probably have counters attached (as it is the case for some already, cf. prometheus_local_storage_out_of_order_samples_total, prometheus_local_storage_inconsistencies_total, ...

@beorn7

This comment has been minimized.

Copy link
Member Author

beorn7 commented Feb 10, 2017

Also see #1315 , in particular consider query logging (separated or at least separatable) and separate out the crash recovery logs.

@gouthamve gouthamve referenced this issue Jun 16, 2017

Merged

Move CLI commander to cobra #2844

3 of 3 tasks complete
@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 14, 2017

I think #1315 covers the main aspects of the 2nd point, and for the 1st point more focused bugs would be useful.

@beorn7

This comment has been minimized.

Copy link
Member Author

beorn7 commented Jul 14, 2017

Can we close this once the more focused bugs are filed and not the other way round?
I think this is important.

@beorn7 beorn7 reopened this Jul 14, 2017

@gouthamve

This comment has been minimized.

Copy link
Member

gouthamve commented Jul 21, 2017

Hi @beorn7 Could you elaborate on what exactly is missing right now? I think most of structured logging is fixed, is it missing counters for errors/warnings?

@beorn7

This comment has been minimized.

Copy link
Member Author

beorn7 commented Jul 21, 2017

It might be all fixed in 2.0. I haven't assessed the state. Happy to close this if that's what you think. I was just objecting the notion of "let's close this and file more focused bugs later". (It should be the other way round. ;)

@gouthamve

This comment has been minimized.

Copy link
Member

gouthamve commented Jul 21, 2017

Yep, absolutely.

If its just counters for errors, I will open a new issue for that labelled low-hanging-fruit but if you think logging is still remaining, I think this should stay open but with a little more description on what is missing.

Also, logging has not changed at all in 2.0. So if you could comment on the state of 1.x, I think it would cover the issue.

@beorn7

This comment has been minimized.

Copy link
Member Author

beorn7 commented Jul 24, 2017

I think we currently have no clarity what our logging philosophy is or should be. We follow different strategies in different parts of the code base. Regularly people complain about doing logging the "wrong" way. Sometimes, somebody angrily rips out logging code that others are then missing dearly (not necessarily in the way that they think it was perfect before but more in the way that the previous state was better than nothing). I think the first step in tackling this would be to write an RFC/design-doc where we come to terms with ourselves what logging should look like. After that, we can adjust reality to our grand plan. In general, I think that many individual aspects will be controversial, and some discussion will be needed to get consensus or at least buy-in.

#1315 covers query logging, which is a big chunk of the work once we get it done. But there is much more.

The notion of having a counter metric for each type of error logged – and vice versa a line of error log for each error metric incremented, might be something to add in there, but even there I'm not sure if it is uncontroversial.

Bottom-line: Writing that RFC and getting clarity about the course of action is the actual work for this issue. Once that's done, filing more concrete bugs is easy (and arguably implementing better logging will be not much more than chore work).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.