示例#1
0
        public static AsyncSender ConfigureAsync(MetricsConfig config)
        {
            CheckValidity(config);

            _text = TextTypeFactory.Create(config);

            var asyncSender = new AsyncSender(
                _text,
                config.Tags,
                config.AsyncMaxNumberOfPointsInQueue,
                config.MaxUDPPacketSize);

            _statsD     = asyncSender;
            _configured = true;

            return(asyncSender);
        }
示例#2
0
        public static AsyncSender ConfigureAsync(MetricsConfig config)
        {
            CheckValidity(config);

            _textUdp = new TextUDP(
                config.ServerName,
                config.ServerPort,
                config.MaxUDPPacketSize);

            var asyncSender = new AsyncSender(
                _textUdp,
                config.Tags,
                config.AsyncMaxNumberOfPointsInQueue,
                config.MaxUDPPacketSize);

            _statsD     = asyncSender;
            _configured = true;

            return(asyncSender);
        }