-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Proposal] Monitor go-redis with https://github.com/alibaba/opentelemetry-go-auto-instrumentation #3205
Comments
why this does not work for you? github.com/redis/go-redis/extra/redisotel/v9 but yeah, need to mention it more prominently |
|
hm, adding hook single time in main.go is not too much trouble. and probably better than pre-compile source code modification by very large code-processing tool. anw, I am not a fan of that tool, and but good point redis docs should mention more directly somewhere how to enable instrumentation. it took me a couple google searches to find out that this code exist in this repo! |
@nikolaydubina would you like to prepare a guide / document on enabling |
not sure there is anything more to document. this is literally one line in main.go in my case I do this: package main
import (
"github.com/redis/go-redis/extra/redisotel/v9"
"github.com/redis/go-redis/v9"
)
func main() {
...
rdb := redis(&redis.Options{...}))
if err := errors.Join(redisotel.InstrumentTracing(rdb), redisotel.InstrumentMetrics(rdb)); err != nil {
log.Fatalln(err)
} and the guys who made redisotel also mention it in their readme: https://github.com/redis/go-redis/tree/master/extra/redisotel so not sure how to document more. maybe we can add it to main README of whole client? so how to use it is super simple. it is just hard to find maybe for people. so good to mention maybe not how to use it, but where to look for how to use it? |
raised PR for main README: #3316 |
@123liuziming if you have a working example feel free to append it in the README. Sounds like we can extract the monitoring information in a separate MONITORING.md or something like that. |
|
I found that go-redis doesn't have the ability to integrate tracing and metrics by default and there doesn't seem to be a best practice in the documentation on how to monitor go-redis applications. Our project(https://github.com/alibaba/opentelemetry-go-auto-instrumentation) allows tracing and metrics(will be supported later) to be collected and reported on the go-redis app without making changes to user code. I was wondering if it would be possible for me to add an observable subsection to the official documentation for this project that describes best practices for observing the go-redis application. Thanks!
The text was updated successfully, but these errors were encountered: