-
Notifications
You must be signed in to change notification settings - Fork 806
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
Add slogAdapter #6405
Add slogAdapter #6405
Conversation
This doesn't seem relevant.
|
dea89dc
to
be2fd7a
Compare
Signed-off-by: SungJin1212 <[email protected]>
Signed-off-by: SungJin1212 <[email protected]>
be2fd7a
to
7012d94
Compare
|
||
// GoKitLogToSlog convert go-kit/log to slog | ||
// usage: logutil.GoKitLogToSlog(gokitLogger) | ||
func GoKitLogToSlog(logger log.Logger) *slog.Logger { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should name this function to PrometheusLoggerToSlot
and have another function for GoKitLogToSlog
which takes an additional level parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR adds a slogAdapter converting
go-kit/log
toslog
.It would be good to use
slogAdapter
to upgrade the Prometheus version. We could implement features included in Prometheus v3.0.0, like OTLP metadata, OOO ingestion native histogram, UTF-8 support, and so on.After that, we could migrate whole logs to
slog
if needed.Which issue(s) this PR fixes:
Fixes #6402
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]