-
Notifications
You must be signed in to change notification settings - Fork 87
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
Register tracers in dispatcher via method instead of constructor #210
Comments
Hi @cpx86, I'm not sure to understand. Can't you use Start(ILogger, IRecordDispatcher) ? |
Oh, just saw the problem, let me check |
It weirdly sound to me that tracers should be registered in dispatchers. I would vote for a RegisterTracer method in Dispatcher. |
I think that makes sense as well. Another question - should the dispatcher receive an pre-baked |
Indeed, feels cleaner as it would separate concerns. Can you come up with a PR ? |
Just realized I missed a very important detail with #208.
The way the TraceManager handles the default dispatcher, it registers it's internal Push method via the constructor of the dispatcher (see https://github.com/openzipkin/zipkin4net/blob/master/Src/zipkin4net/Src/TraceManager.cs#L61). This is obviously not possible for any dispatcher defined outside of zipkin4net.
One way to solve this would be to extend the IRecordDispatcher interface so that the tracer action is registered via a method instead of the constructor. Either
Action<Record>
parameter to the existingRecord
methodRegisterTracers
Thoughts?
The text was updated successfully, but these errors were encountered: