protected DiagnosticListenerObserver(ILoggerFactory loggerFactory, ITracer tracer, GenericEventOptions options) : base(loggerFactory, tracer) { if (!options.IsIgnored(GetListenerName())) { _genericEventProcessor = new GenericEventProcessor(GetListenerName(), Tracer, Logger, options); } }
public void ProcessEvent(string eventName, object untypedArg) { Activity activity = Activity.Current; if (_options != null && _options.IsIgnored(_listenerName, eventName)) { return; } if (activity != null && eventName.EndsWith(".Start", StringComparison.Ordinal)) { HandleActivityStart(eventName, activity, untypedArg); } else if (activity != null && eventName.EndsWith(".Stop", StringComparison.Ordinal)) { HandleActivityStop(eventName, activity); } else { HandleRegularEvent(eventName, untypedArg); } }