prometheus icon indicating copy to clipboard operation
prometheus copied to clipboard

Replace go-kit/log with log/slog

Open jan--f opened this issue 1 year ago • 1 comments

Proposal

As @SuperQ proposed on Slack, the 3.0 release would be a good opportunity to replace go-kit/log with log/slog.

Afaiu the goal is to keep the log output format close to what is logged today with changes where needed. Some cli flag behavior will probably have to change.

jan--f avatar Jun 27 '24 13:06 jan--f

This is a good idea.

roidelapluie avatar Jun 28 '24 08:06 roidelapluie

@jan--f Hi, is it possible for me pick this one up?

ansh-devs avatar Jul 13 '24 16:07 ansh-devs

@jan--f Hi, is it possible for me pick this one up?

@roidelapluie @jan--f ??

ansh-devs avatar Jul 15 '24 07:07 ansh-devs

@ansh-devs yeah I think you can contribute to this. Please reach out to @SuperQ, he might be working on this already. Join us on slack for a quicker discussion.

jan--f avatar Jul 15 '24 08:07 jan--f

Hey all, prometheus/common#677 is ready for review. Once that's done with review and merged, I'll get started converting prometheus to use slog :+1:

tjhop avatar Aug 17 '24 04:08 tjhop

While transition to slog, I can recommend the https://github.com/go-simpler/sloglint which is available via golangci-lint.

jkroepke avatar Sep 08 '24 09:09 jkroepke

I'm nearly finished converting prometheus to use slog via the new promslog package in prometheus/common. I'll open it as a draft PR when ready so we can tear it apart 👍

tjhop avatar Sep 08 '24 20:09 tjhop

#14906 has been merged!

tjhop avatar Oct 08 '24 02:10 tjhop