コード例 #1
0
        public CIAgentWriter(ImmutableTracerSettings settings, ISampler sampler, int maxBufferSize = DefaultMaxBufferSize)
        {
            var isPartialFlushEnabled = settings.ExporterSettings.PartialFlushEnabled;
            var apiRequestFactory     = TracesTransportStrategy.Get(settings.ExporterSettings);
            var api = new Api(apiRequestFactory, null, rates => sampler.SetDefaultSampleRates(rates), isPartialFlushEnabled);

            _agentWriter = new AgentWriter(api, null, maxBufferSize: maxBufferSize);
        }