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

Add enabled property to disable auto-loading #32

Open
codefromthecrypt opened this issue Jun 22, 2017 · 4 comments
Open

Add enabled property to disable auto-loading #32

codefromthecrypt opened this issue Jun 22, 2017 · 4 comments

Comments

@codefromthecrypt
Copy link
Member

there's been a couple hints that we could make it possible to disable auto-loading of tracers. I'm not sure if that would be possible with code change here or not

linkerd/linkerd-zipkin#4 (comment) w/ @klingerf
and also a similar request recently on gitter by @komsit37 who is manually registering an http tracer and doesn't want a default one to pop up.

cc @mosesn for insight if we should add an "enabled" flag or if there are other things related to look at

@mosesn
Copy link

mosesn commented Jun 28, 2017

@adriancole we have a generic facility for disabling specific auto-loaded tracers in LoadService, but it requires passing in a flag or java system properties, so it might not be what you want.

https://github.com/twitter/util/blob/develop/util-app/src/main/scala/com/twitter/finagle/util/flags.scala#L24

Sorry for the delay in getting back to you, was on vacation for the past couple weeks.

@codefromthecrypt
Copy link
Member Author

Thanks tons for the insight, @mosesn! hope the vacation was a nice one.

@komsit37 does something like this work for you?

-Dcom.twitter.finagle.util.loadServiceDenied=zipkin.finagle.http.HttpZipkinTracer

@komsit37
Copy link

komsit37 commented Jul 5, 2017

Thanks @mosesn @adriancole! Yes, that's a good option. But now that I think about it again, if I'm gonna pass a flag anyway, I might as well just use flag to define zipkin host!

@ryanb93
Copy link

ryanb93 commented Jan 24, 2019

It's not clear from the README that providing your own HttpZipkinTracer and using it via .withTracer will actually result in 2 Tracers running. One of which will be pointing to localhost:9411. It's hard to detect when this is happening because the default sample rate is 0.001 so most requests won't cause the error.

The loadServiceDenied flag above fixed the problem, although it feels a little brittle hardcoding the value, thanks!

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