Skip to content

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

Merged
merged 6 commits into from
Jul 17, 2017
Merged

Conversation

yurishkuro
Copy link
Member

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

"go.uber.org/zap"

"fmt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope

@@ -36,15 +36,16 @@ func main() {
builder.Bind(flag.CommandLine)
flag.Parse()

fmt.Printf("%+v\n", builder)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this required?

// Builder provides command line options to configure metrics backend used by Jaeger executables.
type Builder struct {
Backend string
HTTPRoute string
Copy link
Contributor

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

Copy link
Member Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EqualError?

Copy link
Member Author

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 {
Copy link
Contributor

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 != ""

Copy link
Member Author

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)
Copy link
Contributor

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?

Copy link
Member Author

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

"go.uber.org/zap"
"gopkg.in/yaml.v2"

"github.com/uber/jaeger-lib/metrics"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shame 🔔 shame 🔔

Yuri Shkuro added 6 commits July 17, 2017 18:26
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.
@yurishkuro yurishkuro merged commit 3bd1686 into master Jul 17, 2017
@yurishkuro yurishkuro deleted the agent-metrics branch July 17, 2017 23:00
ideepika pushed a commit to ideepika/jaeger that referenced this pull request Oct 22, 2017
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants