public HealthMonitor(DiagnosticsConfig config)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            ClientIP       = EdgeServerDataClient.IpNA;
            EdgeServer     = EdgeServerDataClient.IpNA;
            VideoSessionId = Guid.NewGuid();

            Configuration = config;

            agent = new SamplingAgent();
            if (config.TrackQuality)
            {
                agent.Agents.Add(new QualityAggregationAgent(config.AggregationInterval, config.QualityConfig));
            }
            if (config.TrackQualitySnapshot)
            {
                agent.Agents.Add(new QualitySnapshotAgent(config.SnapshotInterval, config.QualityConfig));
            }
            if (config.TrackDownloadErrors)
            {
                agent.Agents.Add(new DownloadErrorSampleAgent(Configuration));
            }

            if (Configuration.InitTraceMonitor)
            {
                TraceMonitor.Init(Configuration.TracingConfig);
            }
        }
        public HealthMonitor(DiagnosticsConfig config)
        {
            if (config == null)
                throw new ArgumentNullException("config");

            ClientIP = EdgeServerDataClient.IpNA;
            EdgeServer = EdgeServerDataClient.IpNA;
            VideoSessionId = Guid.NewGuid();

            Configuration = config;

            agent = new SamplingAgent();
            if (config.TrackQuality)
                agent.Agents.Add(new QualityAggregationAgent(config.AggregationInterval, config.QualityConfig));
            if (config.TrackQualitySnapshot)
                agent.Agents.Add(new QualitySnapshotAgent(config.SnapshotInterval, config.QualityConfig));
            if (config.TrackDownloadErrors)
                agent.Agents.Add(new DownloadErrorSampleAgent(Configuration));

            if (Configuration.InitTraceMonitor)
            {
                TraceMonitor.Init(Configuration.TracingConfig);
            }
        }