-
Notifications
You must be signed in to change notification settings - Fork 832
Add OpenTracing stuff #148
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
Conversation
(I'm just pushing the changes to the scope vendored code back to scope) |
- Add grpc middleware to client and server - Emit spans from TimeRequestHistogram
Pay attention to the bits in:
Have tested extensively locally. |
"github.com/mwitkow/go-grpc-middleware" | ||
"github.com/opentracing-contrib/go-stdlib/nethttp" | ||
"github.com/opentracing/opentracing-go" | ||
"github.com/tomwilkie/loki/client" |
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.
After all we went through before, this really should be "weaveworks/loki".
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.
This is a personal project right now.
prometheus.MustRegister(resourceWatcher) | ||
} | ||
|
||
tracer, err := loki.NewTracer(loki.DefaultConfig) |
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.
There should be command-line options for scrape intervals & timeouts.
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.
scrape intervals are defined by loki (as it is in prometheus).
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.
In Prometheus, they are defined in the configuration file. Here, we're using the defaults in Loki with no way of customizing them.
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've literrally copied the exact way prometheus does this: https://github.com/tomwilkie/loki/blob/master/pkg/config/config.go
Are we talking cross purposes?
chunk/chunk_store.go
Outdated
return nil, err | ||
} | ||
|
||
// TODO push ctx all the way through, so we can do cancellation (eventually!) |
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.
Are we doing this TODO now?
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.
Yup, done.
So we can visualise query execution, to help with #132