protected override void RegisterCollectors(ILogifyClientConfiguration config) { IgnorePropertiesInfoConfig ignoreConfig = config.IgnoreConfig; if (ignoreConfig == null) { ignoreConfig = new IgnorePropertiesInfoConfig(); } //Collectors.Add(new DevelopementPlatformCollector(Platform.ASP)); // added in constuctor Collectors.Add(new NetCoreWebApplicationCollector()); HttpContext context = LogifyHttpContext.Current; if (context != null) { if (context.Request != null) { Collectors.Add(new RequestCollector(context.Request, ignoreConfig)); } if (context.Response != null) { Collectors.Add(new ResponseCollector(context.Response, ignoreConfig)); } //if (context.ApplicationInstance != null && context.ApplicationInstance.Modules != null) // Collectors.Add(new ModulesCollector(context.ApplicationInstance.Modules)); } Collectors.Add(new OperatingSystemCollector()); //Collectors.Add(new VirtualMachineCollector()); Collectors.Add(new DebuggerCollector()); //Collectors.Add(new MemoryCollector(config)); //Collectors.Add(new FrameworkVersionsCollector()); }
public void Register(ICollector collector) { if (string.IsNullOrWhiteSpace(collector.Key)) { collector.Key = "val" + mid++; } Collectors.Add(collector); }
protected override void RegisterCollectors(ILogifyClientConfiguration config) { Collectors.Add(new MemoryWorkingSetCollector()); Collectors.Add(new MemoryPhysicalRamCollector()); #if !ASP_CLIENT Collectors.Add(new MemoryClrDetailedCollector()); #endif }
protected override void RegisterCollectors(ILogifyClientConfiguration config) { Collectors.Add(new ExceptionTypeCollector()); Collectors.Add(new ExceptionMessageCollector()); Collectors.Add(new ExceptionStackCollector()); Collectors.Add(new ExceptionNormalizedStackCollector()); Collectors.Add(new ExceptionDataCollector()); //etc }
protected override void RegisterCollectors(ILogifyClientConfiguration config) { if (config.CollectMiniDump) { Collectors.Add(new MiniDumpCollector()); } Collectors.Add(new DevelopementPlatformCollector(Platform.WIN)); Collectors.Add(new ConsoleApplicationCollector()); Collectors.Add(new ConsoleEnvironmentCollector(config)); // Environment info should go first, it may be used for further exception processing if (config.CollectMiniDump) { Collectors.Add(new DeferredMiniDumpCollector()); } }
protected override void RegisterCollectors(ILogifyClientConfiguration config) { Collectors.Add(new OperatingSystemCollector()); Collectors.Add(new VirtualMachineCollector()); Collectors.Add(new DebuggerCollector()); Collectors.Add(new MemoryCollector(config)); Collectors.Add(new DisplayCollector()); Collectors.Add(new Win32GuiResourcesCollector()); Collectors.Add(new CurrentCultureCollector()); Collectors.Add(new CurrentUICultureCollector()); Collectors.Add(new FrameworkVersionsCollector()); Collectors.Add(new EnvironmentCollector()); if (config.CollectScreenshot) { Collectors.Add(new ScreenshotCollector()); } //etc }
protected override void RegisterCollectors(ILogifyClientConfiguration config) { if (config.CollectMiniDump) { Collectors.Add(new MiniDumpCollector()); } Collectors.Add(new DevelopementPlatformCollector(Platform.WPF)); Collectors.Add(new WpfApplicationCollector()); //Spies.Add(new AppDispatcherCollector()); //Spies.Add(new DispatcherCollector()); //Spies.Add(new TaskShedulerCollector()); Collectors.Add(new WPFEnvironmentCollector(config)); // Environment info should go first, it may be used for further exception processing if (config.CollectMiniDump) { Collectors.Add(new DeferredMiniDumpCollector()); } }
protected override void RegisterCollectors(ILogifyClientConfiguration config) { Collectors.Add(new DevelopementPlatformCollector(Platform.NETCORE_CONSOLE)); // added in constuctor Collectors.Add(new NetCoreConsoleApplicationCollector()); //HttpContext context = LogifyHttpContext.Current; //if (context != null) { // if (context.Request != null) // Collectors.Add(new RequestCollector(context.Request)); // if (context.Response != null) // Collectors.Add(new ResponseCollector(context.Response)); // //if (context.ApplicationInstance != null && context.ApplicationInstance.Modules != null) // // Collectors.Add(new ModulesCollector(context.ApplicationInstance.Modules)); //} Collectors.Add(new OperatingSystemCollector()); //Collectors.Add(new VirtualMachineCollector()); Collectors.Add(new DebuggerCollector()); //Collectors.Add(new MemoryCollector(config)); //Collectors.Add(new FrameworkVersionsCollector()); }
public void UpsertCollector(Collector collector) { Debug.Assert(!this.m_readOnly, "Configuration in use is read-only. Did you forget BeginCachedConfiguration?"); if (!Collectors.ContainsKey(collector.Name)) { // Clone the collector and add to the configuration's Collector dictionary Collectors.Add(collector.Name, (Collector)collector.Clone()); _logger.LogInformation($"Collector {collector.Name} added."); } else { Debug.Assert(Collectors.ContainsKey(collector.Name), "Collector not found in dictionary. Cannot update."); // Clone the user and update the configuration's UserProfile dictionary Collectors[collector.Name] = (Collector)collector.Clone(); _logger.LogInformation($"Collector {collector.Name} updated."); } }
private void LoadCollectorsInfo(object sender, ElapsedEventArgs args) { using (ApplicationContext db = new ApplicationContext()) { foreach (SessionSettings session in db.Sessions.ToList()) { if (!state.AllSessions.ContainsKey(session.SessionStorageHost)) { state.AllSessions.TryAdd(session.SessionStorageHost, session); state.SessionStorages.Add(session); } } foreach (Collector collector in db.Collectors.ToList()) { if (!state.AllCollectors.ContainsKey(collector.Phone)) { state.AllCollectors.TryAdd(collector.Phone, collector); if (state.Collectors.TryGetValue(collector.Group, out ConcurrentBag <Collector> Collectors)) { if (Collectors == null) { Collectors = new ConcurrentBag <Collector>(); } Collectors.Add(collector); } else { state.Collectors.TryAdd(collector.Group, new ConcurrentBag <Collector>() { collector }); } } } } }
public void Register(Func <object, object, AggregateNode, IScope, object> valFunc) { Collectors.Add(new Collector { ValueFunction = valFunc, Key = "val" + mid++ }); }
public NetCoreWebExceptionCollector(ILogifyClientConfiguration config, Platform platform) : base(config) { Collectors.Add(new DevelopementPlatformCollector(platform)); }
public ExceptionObjectInfoCollector(ILogifyClientConfiguration config, MethodCallArgumentMap callArgumentsMap) : base(config) { Collectors.Add(new ExceptionMethodCallArgumentsCollector(callArgumentsMap)); }
//public virtual List<DataCollector> GetCollectors(ICollectionTimeRetriever tr) //{ // List<DataCollector> collectors = new List<DataCollector>(); // // We want to get the collectors in the same order presented to us by the // // retriever because they're in priority order. // int? id = tr.GetNextID(); // while(id != null) // { // DataCollector dc = Collectors.Find(c => c.Context.ID.ID == id.Value); // if (dc != null) // collectors.Add(dc); // id = tr.GetNextID(); // } // return collectors; //} /// <summary> /// Called by the child classes to add a DataCollector to the /// set of collectors, and hook in the OnDataCollected /// method to handle the data that's been collected. /// </summary> /// <param name="d"></param> /// <returns></returns> protected DataCollector Collect(DataCollector d) { Collectors.Add(d); d.AttachDataAcquiredHandler(OnDataCollected); return(d); }
/// <summary> /// Loading QuickMon monitor pack file /// </summary> /// <param name="configurationFile">Serialzed monitor pack file</param> public void Load(string configurationFile) { XmlDocument configurationXml = new XmlDocument(); configurationXml.LoadXml(System.IO.File.ReadAllText(configurationFile, Encoding.UTF8)); XmlElement root = configurationXml.DocumentElement; Name = root.Attributes.GetNamedItem("name").Value; Enabled = bool.Parse(root.Attributes.GetNamedItem("enabled").Value); AgentsAssemblyPath = root.ReadXmlElementAttr("agentRegistrationPath"); string defaultViewerNotifierName = root.ReadXmlElementAttr("defaultViewerNotifier"); RunCorrectiveScripts = bool.Parse(root.ReadXmlElementAttr("runCorrectiveScripts", "false")); foreach (XmlElement xmlCollectorEntry in root.SelectNodes("collectorEntries/collectorEntry")) { CollectorEntry newCollectorEntry = CollectorEntry.FromConfig(xmlCollectorEntry); ApplyCollectorConfig(newCollectorEntry); Collectors.Add(newCollectorEntry); } foreach (XmlElement xmlNotifierEntry in root.SelectNodes("notifierEntries/notifierEntry")) { NotifierEntry newNotifierEntry = NotifierEntry.FromConfig(xmlNotifierEntry); AgentRegistration currentNotifier = null; if (AgentRegistrations != null) { currentNotifier = (from o in AgentRegistrations where o.IsNotifier && o.Name == newNotifierEntry.NotifierRegistrationName select o).FirstOrDefault(); } if (currentNotifier != null) { newNotifierEntry.Notifier = NotifierEntry.CreateNotifierEntry(currentNotifier.AssemblyPath, currentNotifier.ClassName); XmlDocument configDoc = new XmlDocument(); configDoc.LoadXml(newNotifierEntry.Configuration); try { newNotifierEntry.Notifier.ReadConfiguration(configDoc); } catch // (Exception ex) { newNotifierEntry.Enabled = false; } } else { newNotifierEntry.Enabled = false; } Notifiers.Add(newNotifierEntry); if (newNotifierEntry.Name.ToUpper() == defaultViewerNotifierName.ToUpper()) { DefaultViewerNotifier = newNotifierEntry; } } MonitorPackPath = configurationFile; RaiseMonitorPackPathChanged(MonitorPackPath); if (Properties.Settings.Default.recentMonitorPacks == null) { Properties.Settings.Default.recentMonitorPacks = new System.Collections.Specialized.StringCollection(); } if (!Properties.Settings.Default.recentMonitorPacks.Contains(configurationFile)) { Properties.Settings.Default.recentMonitorPacks.Add(configurationFile); Properties.Settings.Default.Save(); } InitializeGlobalPerformanceCounters(); }