/// <summary>
        /// Meter represents the metric that measurese the rate at which an event occurs. 
        /// You can use meter to count failed requests per second metric.
        /// </summary>
        /// <param name="telemetryClient">Telemetry client to associate the meter with.</param>
        /// <param name="name">Name of the meter.</param>
        /// <param name="aggregations">Aggregation to apply.</param>
        /// <returns>Returns a meter implementation.</returns>
        public static IMeter Meter(this TelemetryClient telemetryClient, string name, MeterAggregations aggregations = MeterAggregations.Rate)
        {
            var meter = new MeterImplementation(name, telemetryClient.Context, aggregations);

            var configuration = GetConfigurationFromClient(telemetryClient);
            configuration.RegisterCounter(meter);

            return meter;
        }
 public TimerMetric(SamplingType samplingType, MeterImplementation meter, Clock clock)
     : this(new HistogramMetric(samplingType), meter, clock)
 {
 }
Example #3
0
 public TimerMetric(HistogramImplementation histogram, MeterImplementation meter, Clock clock)
 {
     this.clock     = clock;
     this.meter     = meter;
     this.histogram = histogram;
 }