public ClientDiagnosticProcessor(IExitSegmentContextAccessor segmentContextAccessor, ITracingContext tracingContext, IConfigAccessor configAccessor) { _tracingContext = tracingContext; _segmentContextAccessor = segmentContextAccessor; _tracingConfig = configAccessor.Get <TracingConfig>(); }
public ServerDiagnosticProcessor(IEntrySegmentContextAccessor segmentContextAccessor, ITracingContext tracingContext, IConfigAccessor configAccessor) { _tracingContext = tracingContext; _segmentContextAccessor = segmentContextAccessor; _tracingConfig = configAccessor.Get <TracingConfig>(); }
public SegmentReporter(ConnectionManager connectionManager, IConfigAccessor configAccessor, ILoggerFactory loggerFactory) { _transportConfig = configAccessor.Get <TransportConfig>(); _segmentReporterV5 = new V5.SegmentReporter(connectionManager, configAccessor, loggerFactory); _segmentReporterV6 = new V6.SegmentReporter(connectionManager, configAccessor, loggerFactory); }
public static ConfigParameter CreateConfigParameter(IConfigAccessor configAccessor, ConfigParameterData configParameterData) { Verify.Argument.IsNotNull(configAccessor, "configAccessor"); Verify.Argument.IsNotNull(configParameterData, "configParameterData"); switch (configParameterData.ConfigFile) { case ConfigFile.Repository: throw new ArgumentException("Config file cannot be 'Repository'.", "configParameterData"); case ConfigFile.Other: return(new ConfigParameter( configAccessor, configParameterData.SpecifiedFile, configParameterData.Name, configParameterData.Value)); default: return(new ConfigParameter( configAccessor, configParameterData.ConfigFile, configParameterData.Name, configParameterData.Value)); } }
public PingCaller(ConnectionManager connectionManager, ILoggerFactory loggerFactory, IConfigAccessor configAccessor) { _connectionManager = connectionManager; _config = configAccessor.Get <GrpcConfig>(); _logger = loggerFactory.CreateLogger(typeof(PingCaller)); }
public SamplingRefreshService(IConfigAccessor configAccessor, IRuntimeEnvironment runtimeEnvironment, ILoggerFactory loggerFactory) : base(runtimeEnvironment, loggerFactory) { _config = configAccessor.Get <SamplingConfig>(); DefaultSampler.Instance.SetSamplePer3Secs(_config.SamplePer3Secs); }
public InstrumentRequestCallback(IConfigAccessor configAccessor, ITracingContext tracingContext, IEntrySegmentContextAccessor contextAccessor) { _config = configAccessor.Get <InstrumentConfig>(); _tracingContext = tracingContext; _contextAccessor = contextAccessor; }
public SegmentReporter(ConnectionManager connectionManager, IConfigAccessor configAccessor, ILoggerFactory loggerFactory) { _connectionManager = connectionManager; _config = configAccessor.Get <GrpcConfig>(); _logger = loggerFactory.CreateLogger(typeof(SegmentReporter)); }
public PhotoRepository(ISessionContainer sessionContainer, IImageGenerator imageGenerator, IConfigAccessor configAccessor, ILogger logger) { this.sessionContainer = sessionContainer; this.imageGenerator = imageGenerator; this.configAccessor = configAccessor; this.logger = logger; }
/// <summary>Initializes a new instance of the <see cref="PhotosController"/> class.</summary> /// <param name="configAccessor">The config accessor.</param> /// <param name="photoRepository">The photo repository.</param> /// <param name="userRepository">The user repository.</param> /// <param name="logger">The logger.</param> public PhotosController(IConfigAccessor configAccessor, IPhotoRepository photoRepository, IUserRepository userRepository, ILogger logger) { this.configAccessor = configAccessor; this.photoRepository = photoRepository; this.userRepository = userRepository; this.logger = logger; }
public SkyApmClientV5(ConnectionManager connectionManager, IConfigAccessor configAccessor, ILoggerFactory loggerFactory) { _connectionManager = connectionManager; _config = configAccessor.Get <GrpcConfig>(); _logger = loggerFactory.CreateLogger(typeof(SkyApmClientV5)); }
public PingCaller(ConnectionManager connectionManager, ILoggerFactory loggerFactory, IConfigAccessor configAccessor) { _connectionManager = connectionManager; _config = configAccessor.Get <GrpcConfig>(); _logger = loggerFactory.CreateLogger(NLog.LogManager.GetCurrentClassLogger()); }
public SegmentReporter(ConnectionManager connectionManager, IConfigAccessor configAccessor, ILoggerFactory loggerFactory) { _connectionManager = connectionManager; _config = configAccessor.Get <GrpcConfig>(); _logger = loggerFactory.CreateLogger(NLog.LogManager.GetCurrentClassLogger()); }
public SimpleCountSamplingInterceptor(IConfigAccessor configAccessor, IRuntimeEnvironment runtimeEnvironment, ILoggerFactory loggerFactory) : base(runtimeEnvironment, loggerFactory) { var samplingConfig = configAccessor.Get <SamplingConfig>(); _samplePer3Secs = samplingConfig.SamplePer3Secs; _sample_on = _samplePer3Secs > -1; }
public SegmentReportService(IConfigAccessor configAccessor, ISegmentDispatcher dispatcher, IRuntimeEnvironment runtimeEnvironment, ILoggerFactory loggerFactory) : base(runtimeEnvironment, loggerFactory) { _dispatcher = dispatcher; _config = configAccessor.Get <TransportConfig>(); Period = TimeSpan.FromMilliseconds(_config.Interval); }
public PingService(IConfigAccessor configAccessor, IPingCaller pingCaller, IRuntimeEnvironment runtimeEnvironment, ILoggerFactory loggerFactory) : base( runtimeEnvironment, loggerFactory) { _pingCaller = pingCaller; _transportConfig = configAccessor.Get <TransportConfig>(); }
public ServiceDiscoveryV5Service(IConfigAccessor configAccessor, ISkyApmClientV5 skyApmClient, IRuntimeEnvironment runtimeEnvironment, ILoggerFactory loggerFactory) : base(runtimeEnvironment, loggerFactory) { _config = configAccessor.Get <InstrumentConfig>(); _transportConfig = configAccessor.Get <TransportConfig>(); this.skyApmClient = skyApmClient; }
public CLRStatsReporter(ConnectionManager connectionManager, ILoggerFactory loggerFactory, IConfigAccessor configAccessor, IRuntimeEnvironment runtimeEnvironment) { _connectionManager = connectionManager; _logger = loggerFactory.CreateLogger(NLog.LogManager.GetCurrentClassLogger()); _config = configAccessor.Get <GrpcConfig>(); _runtimeEnvironment = runtimeEnvironment; }
public AsyncQueueTraceDispatcher(IConfigAccessor configAccessor, ISkyWalkingClient client, ILoggerFactory loggerFactory) { _skyWalkingClient = client; _logger = loggerFactory.CreateLogger(typeof(AsyncQueueTraceDispatcher)); _config = configAccessor.Get <TransportConfig>(); _segmentQueue = new ConcurrentQueue <TraceSegmentRequest>(); _cancellation = new CancellationTokenSource(); }
public RegisterService(IConfigAccessor configAccessor, IServiceRegister serviceRegister, IRuntimeEnvironment runtimeEnvironment, ILoggerFactory loggerFactory) : base(runtimeEnvironment, loggerFactory) { _serviceRegister = serviceRegister; _config = configAccessor.Get <InstrumentConfig>(); _transportConfig = configAccessor.Get <TransportConfig>(); }
public ServiceConfigLocator(ILoggerFactory loggerFactory, IConfigAccessor configAccessor, ServiceClient serviceClient) { _client = serviceClient; _services = new List <ServiceDto>(); _logger = loggerFactory.CreateLogger(typeof(ServiceConfigLocator)); _config = configAccessor.Get <DiscoveryServiceConfig>(); _timer = new Timer(ScheduleRefresh, null, 0, _config.RefreshInterval); }
/// <summary>Create <see cref="ConfigParameter"/>.</summary> /// <param name="repository">Related <see cref="Repository"/>.</param> /// <param name="name">Paramater name.</param> /// <param name="value">Parameter value.</param> internal ConfigParameter(IConfigAccessor configAccessor, ConfigFile configFile, string name, string value) : base(name) { Verify.Argument.IsNotNull(configAccessor, "configAccessor"); _configAccessor = configAccessor; _configFile = configFile; _value = value; }
public HostingTracingDiagnosticProcessor(IEntrySegmentContextAccessor segmentContextAccessor, ITracingContext tracingContext, IEnumerable <IHostingDiagnosticHandler> diagnosticHandlers, IConfigAccessor configAccessor) { _tracingContext = tracingContext; _diagnosticHandlers = diagnosticHandlers.Reverse(); _segmentContextAccessor = segmentContextAccessor; _tracingConfig = configAccessor.Get <TracingConfig>(); }
public CLRStatsReporter(ConnectionManager connectionManager, ILoggerFactory loggerFactory, IConfigAccessor configAccessor, IRuntimeEnvironment runtimeEnvironment) { _connectionManager = connectionManager; _logger = loggerFactory.CreateLogger(typeof(CLRStatsReporter)); _config = configAccessor.Get <GrpcConfig>(); _runtimeEnvironment = runtimeEnvironment; _instrumentConfig = configAccessor.Get <InstrumentConfig>(); }
public AsyncQueueSegmentDispatcher(IConfigAccessor configAccessor, ISegmentReporter segmentReporter, ILoggerFactory loggerFactory) { _segmentReporter = segmentReporter; _logger = loggerFactory.CreateLogger(typeof(AsyncQueueSegmentDispatcher)); _config = configAccessor.Get <TransportConfig>(); _segmentQueue = new ConcurrentQueue <SegmentRequest>(); _cancellation = new CancellationTokenSource(); }
/// <summary>Create <see cref="ConfigParameter"/>.</summary> /// <param name="repository">Related <see cref="Repository"/>.</param> /// <param name="name">Paramater name.</param> /// <param name="value">Parameter value.</param> internal ConfigParameter(IConfigAccessor configAccessor, ConfigFile configFile, string name, string value) : base(name) { Verify.Argument.IsNotNull(configAccessor, nameof(configAccessor)); _configAccessor = configAccessor; _configFile = configFile; _value = value; }
public TraceSegmentTransportService(IConfigAccessor configAccessor, ITraceDispatcher dispatcher, ISkyWalkingClient skyWalking, IRuntimeEnvironment runtimeEnvironment, ILoggerFactory loggerFactory) : base(skyWalking, runtimeEnvironment, loggerFactory) { _dispatcher = dispatcher; _config = configAccessor.Get <TransportConfig>(); Period = TimeSpan.FromMilliseconds(_config.Interval); TracingContext.ListenerManager.Add(this); }
/// <summary>Create <see cref="ConfigParameter"/>.</summary> /// <param name="repository">Related <see cref="Repository"/>.</param> /// <param name="name">Paramater name.</param> /// <param name="value">Parameter value.</param> internal ConfigParameter(IConfigAccessor configAccessor, string fileName, string name, string value) : base(name) { Verify.Argument.IsNotNull(configAccessor, nameof(configAccessor)); _configAccessor = configAccessor; _configFile = Git.ConfigFile.Other; _fileName = fileName; _value = value; }
public IgnorePathSamplingInterceptor(IConfigAccessor configAccessor) { var ignorePaths = configAccessor.Get <SamplingConfig>().IgnorePaths; _sample_on = ignorePaths?.Count > 0; if (_sample_on) { _ignorePaths = ignorePaths; } }
/// <summary>Create <see cref="ConfigParameter"/>.</summary> /// <param name="repository">Related <see cref="Repository"/>.</param> /// <param name="name">Paramater name.</param> /// <param name="value">Parameter value.</param> internal ConfigParameter(IConfigAccessor configAccessor, string fileName, string name, string value) : base(name) { Verify.Argument.IsNotNull(configAccessor, "configAccessor"); _configAccessor = configAccessor; _configFile = Git.ConfigFile.Other; _fileName = fileName; _value = value; }
public AsyncQueueSkyApmLogDispatcher(IConfigAccessor configAccessor, ILoggerFactory loggerFactory, ILoggerContextContextMapper loggerContextContextMapper, ILoggerReporter loggerReporter, IRuntimeEnvironment runtimeEnvironment) { _logger = loggerFactory.CreateLogger(typeof(AsyncQueueSkyApmLogDispatcher)); _config = configAccessor.Get <TransportConfig>(); _loggerContextContextMapper = loggerContextContextMapper; _runtimeEnvironment = runtimeEnvironment; _segmentQueue = new ConcurrentQueue <LoggerRequest>(); _cancellation = new CancellationTokenSource(); _loggerReporter = loggerReporter; }
public Sw3CarrierFormatter(IUniqueIdParser uniqueIdParser, IConfigAccessor configAccessor) { _uniqueIdParser = uniqueIdParser; var config = configAccessor.Get <InstrumentConfig>(); Key = string.IsNullOrEmpty(config.Namespace) ? HeaderVersions.SW3 : $"{config.Namespace}-{HeaderVersions.SW3}"; Enable = config.HeaderVersions != null && config.HeaderVersions.Contains(HeaderVersions.SW3); }
public static ConfigParameter CreateConfigParameter(IConfigAccessor configAccessor, ConfigParameterData configParameterData) { Verify.Argument.IsNotNull(configAccessor, "configAccessor"); Verify.Argument.IsNotNull(configParameterData, "configParameterData"); switch(configParameterData.ConfigFile) { case ConfigFile.Repository: throw new ArgumentException("Config file cannot be 'Repository'.", "configParameterData"); case ConfigFile.Other: return new ConfigParameter( configAccessor, configParameterData.SpecifiedFile, configParameterData.Name, configParameterData.Value); default: return new ConfigParameter( configAccessor, configParameterData.ConfigFile, configParameterData.Name, configParameterData.Value); } }
/// <summary>Create <see cref="ConfigParameter"/>.</summary> /// <param name="repository">Related <see cref="Repository"/>.</param> /// <param name="name">Paramater name.</param> /// <param name="value">Parameter value.</param> internal ConfigParameter(Repository repository, ConfigFile configFile, string name, string value) : base(repository, name) { _configAccessor = repository.Accessor; _value = value; }