-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Support configurable metrics backend in the agent #275
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
cmd/agent/main.go
Outdated
"go.uber.org/zap" | ||
|
||
"fmt" |
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.
nope
cmd/agent/main.go
Outdated
@@ -36,15 +36,16 @@ func main() { | |||
builder.Bind(flag.CommandLine) | |||
flag.Parse() | |||
|
|||
fmt.Printf("%+v\n", builder) |
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.
is this required?
pkg/metrics/builder.go
Outdated
// Builder provides command line options to configure metrics backend used by Jaeger executables. | ||
type Builder struct { | ||
Backend string | ||
HTTPRoute string |
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.
HTTPScrapeEndpoint? or at least a comment
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.
will add a comment. It's not always for scraping.
} | ||
mf, err := b.CreateMetricsFactory("foo") | ||
if testCase.err != nil { | ||
assert.Equal(t, err, testCase.err) |
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.
EqualError?
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.
no, it's an error object here
continue | ||
} | ||
require.NotNil(t, mf) | ||
if testCase.handler { |
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.
nit: could probably remove the handler
variable and just do:
route != ""
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.
explicit is better
if testCase.handler { | ||
require.NotNil(t, b.handler) | ||
mux := http.NewServeMux() | ||
b.RegisterHandler(mux) |
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.
is there anyway to check if this function actually worked?
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.
we could start an http server and query it, but feels like overkill
cmd/agent/app/builder_test.go
Outdated
"go.uber.org/zap" | ||
"gopkg.in/yaml.v2" | ||
|
||
"github.com/uber/jaeger-lib/metrics" |
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.
shame 🔔 shame 🔔
Defaults to expvar. Prometheus metrics currently don't work because it does not allow dots in the names (jaegertracing/jaeger-lib#20) and requires pre-declaring all tag keys, which is not supported by the Jaeger's metrics API.
07eee17
to
6196067
Compare
Defaults to expvar. Prometheus metrics currently don't work because it does not allow dots in the names (jaegertracing/jaeger-lib#20) and requires pre-declaring all tag keys, which is not supported by the Jaeger's metrics API.
Defaults to expvar. Prometheus metrics currently don't work because
it does not allow dots in the names (jaegertracing/jaeger-lib#20)
and requires pre-declaring all tag keys, which is not supported by
the Jaeger's metrics API.
Re: https://github.com/uber/jaeger/issues/273