Closed lmolkova closed 5 years ago
DependencyCollector now has a hardcoded list of supported dependencies (http only for now):
namespace OpenCensus.Collector.Dependencies{ // ... public DependenciesCollector(DependenciesCollectorOptions options, ITracer tracer, ISampler sampler, IPropagationComponent propagationComponent) { this.diagnosticSourceSubscriber = new DiagnosticSourceSubscriber( new Dictionary<string, Func<ITracer, Func<HttpRequestMessage, ISampler>, ListenerHandler>>() { { "HttpHandlerDiagnosticListener", (t, s) => new HttpHandlerDiagnosticListener(t, s, propagationComponent) } , // e.g. how do I add { "Microsoft.Azure.Sdk", (t, s) => new AzureSdkListener(t, sampler) } }, tracer, x => {... }); this.diagnosticSourceSubscriber.Subscribe(); }
We should allow configuring generic sources by name and allowing to provide custom handlers. This could be done via DependenciesCollectorOptions.
This is also useful when users need to remove default collectors.
Moved to OpenTelemetry
DependencyCollector now has a hardcoded list of supported dependencies (http only for now):
We should allow configuring generic sources by name and allowing to provide custom handlers. This could be done via DependenciesCollectorOptions.
This is also useful when users need to remove default collectors.