This is a tenetative PR to be treated as Work In Progress. Points to note/discuss before finalizing -
ListenerHandler was made abstract, forcing subclasses to define OnStartActivity.
The default impementation of just setting a sampler didnt help as the sampler needed the URI that has to be extracted in custom way.
For this to be truly generic, the input param of the func may be not just Uri, but a bigger struct with more possibilities. However, I dont want to make this a generic object, as the individual listeners should have a hard protocol on what to pass in to get a sampler.
The HttpInListener for Microsoft.AspNetCore did not have the exclusion for zipkin.azure... domain, hence initialized with a function hardcoded to return AlwaysSample in Startup.cs. Confirm/ discuss.
Cleanup - Some code lines i commented out for now need to the cleaned before final merge (self-reminder)
I had to install Asnnet.Http Extensions to use GetDisplayUrl , which was just to pass into the sampler func, but don't think I needed it as the func anyway returns AlwaysSample. Discuss.
This is a tenetative PR to be treated as Work In Progress. Points to note/discuss before finalizing -