Exemplo n.º 1
0
        public void Start([NotNull] IConfigurationProvider configProvider)
        {
            TimeProvider         = new TimeProvider();
            AnnotationNameMapper = new AnnotationNameMapper();
            TraceSampler         = new TraceSampler(configProvider, TimeProvider);
            TraceInfoStorage     = new TraceInfoStorage(configProvider);
            var sender = new TraceInfoSender(configProvider, new TraceInfoSerializer());

            daemon = new TraceInfoSenderDaemon(configProvider, TraceInfoStorage, sender);
            daemon.Start();
            isStarted = true;
        }
Exemplo n.º 2
0
        public void SetUp()
        {
            config = new Core.Config.TracingConfig(true, null, null)
            {
                SamplingChance      = 1d,
                MaxSamplesPerSecond = int.MaxValue,
            };

            timeProvider = Substitute.For <ITimeProvider>();
            timeProvider.GetCurrentTime().Returns(DateTime.UtcNow);

            sampler = new Core.Impl.TraceSampler(new StaticConfigurationProvider(config), timeProvider);
        }