Skip to content
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

run agent occurred an error by prometheus #651

Closed
popwalker opened this issue Jan 17, 2018 · 9 comments
Closed

run agent occurred an error by prometheus #651

popwalker opened this issue Jan 17, 2018 · 9 comments

Comments

@popwalker
Copy link

When i run agent, it failed ,the error message is:

# go run ./cmd/agent/main.go
github.com/uber/jaeger-lib/metrics/prometheus
../../uber/jaeger-lib/metrics/prometheus/factory.go:143:12: cannot use hv.WithLabelValues(f.tagsAsLabelValues(labelNames, tags)...) (type prometheus.Observer) as type prometheus.Histogram in field value:
	prometheus.Observer does not implement prometheus.Histogram (missing Collect method)

when i locate the code ,It is really an error:
image

didn't find other issue mentioned about this,Given that I do not really familiar with prometheus,I haven't find a way to resolve this problem

@black-adder
Copy link
Contributor

My guess is there's a dependency mismatch, can you tell me what version of github.com/prometheus/client_golang you see in glide.lock?

@popwalker
Copy link
Author

@black-adder ,the version of github.com/prometheus/client_golang in glide.lock is :

- name: github.com/prometheus/client_golang
  version: c5b7fccd204277076155f10851dad72b76a49317
  subpackages:
  - prometheus
  - prometheus/promhttp

after I posted the issue,I found my jaeger version was old, then updated it. I noticed that the new version of jaeger/cmd/agent/main.go, import github.com/jaegertracing/jaeger instead of github.com/uber/jaeger-lib .
When try to run agent, I got another error:

github.com/jaegertracing/jaeger/pkg/cassandra/config/config.go:136:10: cannot use tls.Config literal (type tls.Config) as type *tls.Config in field value

Screenshot:
image
I just change tls.Config to &tls.Config to fix it ,then the agent could run as expected.
but that error in github.com/jaegertracing/jaeger-lib/metrics/prometheus/factory.go:143 was still there.
a little confused :(

@jpkrohling
Copy link
Contributor

jpkrohling commented May 15, 2018

I can reproduce the problem about tls.Config. From the latest master (a4706c0d), these are my changes:

diff --git a/glide.lock b/glide.lock
index 15dfad6..972af16 100644
--- a/glide.lock
+++ b/glide.lock
@@ -60,7 +60,7 @@ imports:
 - name: github.com/go-openapi/validate
   version: a762d5dd38f7c7e9e1a13c3e98344cfbe4aa15d9
 - name: github.com/gocql/gocql
-  version: 4d2d1ac71932f7c4a6c7feb0d654462e4116c58b
+  version: 181004e14a3fb735efcc826a4256369d0c96747b
   subpackages:
   - internal/lru
   - internal/murmur
diff --git a/glide.yaml b/glide.yaml
index 687a535..613f869 100644
--- a/glide.yaml
+++ b/glide.yaml
@@ -5,7 +5,7 @@ import:
   subpackages:
   - lib/go/thrift
 - package: github.com/gocql/gocql
-  version: 4d2d1ac71932f7c4a6c7feb0d654462e4116c58b
+  version: 181004e14a3fb735efcc826a4256369d0c96747b
 - package: github.com/opentracing/opentracing-go
   subpackages:
   - ext

Then:

$ rm -rf vendor
$ glide install
$ make test

The last command yields:

# github.com/jaegertracing/jaeger/pkg/cassandra/config
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger/pkg/cassandra/config/config.go:136:10: cannot use tls.Config literal (type tls.Config) as type *tls.Config in field value
make: *** [Makefile:73: test] Error 2

@yurishkuro
Copy link
Member

Probably because of incompatible upgrade of gocql driver. It's on our to do list to test an upgrade for perf impact

@jpkrohling
Copy link
Contributor

It's on our to do list

Is there a GitHub issue for this task? If it's only a matter of updating the gocql, I can probably do it.

@yurishkuro
Copy link
Member

Upgrading is the easy part, we need to deploy it and see the impact at scale. @black-adder claims he tried it once and saw perf drop

@black-adder
Copy link
Contributor

The fool I was I didn't dig into it, if you're willing to bump it and submit a PR, I can run it internally and make sure the metrics look fine.

@jpkrohling
Copy link
Contributor

@jmhon08 this could be the perfect first issue for you! Would you like to send a PR? I can help you with that.

This was referenced May 16, 2018
@jpkrohling
Copy link
Contributor

Looks like this is not an issue anymore.

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

No branches or pull requests

4 participants