Example #1
0
        public async Task NullUri_Flush_DoesNotThrow()
        {
            var handler = new SignalFxMetricHandler(null);

            handler.SerializeMetric(new MetricReading("test.metric", MetricType.Counter, 1d, ImmutableDictionary <string, string> .Empty, DateTime.UtcNow));
            await handler.FlushAsync(TimeSpan.Zero, 0, _ => { }, _ => { });
        }
        /// <summary>
        /// Adds a SignalFx endpoint to the collector.
        /// </summary>
        public static IMetricsCollectorBuilder AddSignalFxEndpoint(this IMetricsCollectorBuilder builder, Uri baseUri, string accessToken, Action <SignalFxMetricHandler> configure = null)
        {
            var handler = new SignalFxMetricHandler(baseUri, accessToken);

            configure?.Invoke(handler);
            return(builder.AddEndpoint("SignalFx", handler));
        }
Example #3
0
        public void NullUri_Serialization_DoesNotThrow()
        {
            var handler = new SignalFxMetricHandler(null);

            handler.SerializeMetric(new MetricReading("test.metric", MetricType.Counter, 1d, ImmutableDictionary <string, string> .Empty, DateTime.UtcNow));
        }