Method | Description | |
---|---|---|
Context ( string contextName ) : IMetricsContext |
Create a new child metrics context. Metrics added to the child context are kept separate from the metrics in the parent context.
|
|
Counter ( string name, Units unit, string tag = null ) : ICounter |
A counter is a simple incrementing and decrementing 64-bit integer. Ex number of active requests.
|
|
Counter ( string name, string unitName, string tag = null ) : ICounter |
A counter is a simple incrementing and decrementing 64-bit integer. Ex number of active requests.
|
|
Dispose ( ) : void |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
|
Gauge ( string name, Func |
A gauge is the simplest metric type. It just returns a value. This metric is suitable for instantaneous values.
|
|
Histogram ( string name, Units unit, SamplingTypes samplingType = SamplingTypes.FavorRecent, string tag = null ) : IHistogram |
A Histogram measures the distribution of values in a stream of data: e.g., the number of results returned by a search.
|
|
Meter ( string name, Units unit, TimeUnits rateUnit = TimeUnits.Seconds, string tag = null ) : IMeter |
A meter measures the rate at which a set of events occur, in a few different ways. This metric is suitable for keeping a record of now often something happens ( error, request etc ). The mean rate is the average rate of events. It’s generally useful for trivia, but as it represents the total rate for your application’s entire lifetime (e.g., the total number of requests handled, divided by the number of seconds the process has been running), it does not offer a sense of recency. Luckily, meters also record three different exponentially-weighted moving average rates: the 1-, 5-, and 15-minute moving averages. |
|
Meter ( string name, string unitName, TimeUnits rateUnit, string tag = null ) : IMeter |
A meter measures the rate at which a set of events occur, in a few different ways. This metric is suitable for keeping a record of now often something happens ( error, request etc ). The mean rate is the average rate of events. It’s generally useful for trivia, but as it represents the total rate for your application’s entire lifetime (e.g., the total number of requests handled, divided by the number of seconds the process has been running), it does not offer a sense of recency. Luckily, meters also record three different exponentially-weighted moving average rates: the 1-, 5-, and 15-minute moving averages. |
|
MetricsContext ( global context ) : System |
Initializes a new instance of the MetricsContext class.
|
|
ShutdownContext ( string contextName ) : void |
Remove a child context. The metrics for the child context are removed from the MetricsData of the parent context.
|
|
Timer ( string name, Units unit, SamplingTypes samplingType = SamplingTypes.FavorRecent, TimeUnits rateUnit = TimeUnits.Seconds, TimeUnits durationUnit = TimeUnits.Milliseconds, string tag = null ) : ITimer |
A timer is basically a histogram of the duration of a type of event and a meter of the rate of its occurrence.
|
public Context ( string contextName ) : IMetricsContext | ||
contextName | string | Name of the child context. |
return | IMetricsContext |
public Counter ( string name, Units unit, string tag = null ) : ICounter | ||
name | string | Name of the metric. Must be unique across all counters in this context. |
unit | Units | Description of what the is being measured ( Unit.Requests , Unit.Items etc ) . |
tag | string | Optional tag that can be associated with the metric. |
return | ICounter |
public Counter ( string name, string unitName, string tag = null ) : ICounter | ||
name | string | Name of the metric. Must be unique across all counters in this context. |
unitName | string | A Parent name; child counters can be added to this by specifying the this name |
tag | string | Optional tag that can be associated with the metric. |
return | ICounter |
public Gauge ( string name, Func |
||
name | string | Name of this gauge metric. Must be unique across all gauges in this context. |
valueProvider | Func |
Function that returns the value for the gauge. |
unit | Units | Description of want the value represents ( Unit.Requests , Unit.Items etc ) . |
tag | string | Optional tag that can be associated with the metric. |
return | void |
public Histogram ( string name, Units unit, SamplingTypes samplingType = SamplingTypes.FavorRecent, string tag = null ) : IHistogram | ||
name | string | Name of the metric. Must be unique across all histograms in this context. |
unit | Units | Description of what the is being measured ( Unit.Requests , Unit.Items etc ) . |
samplingType | SamplingTypes | Type of the sampling to use (see SamplingType for details ). |
tag | string | Optional tag that can be associated with the metric. |
return | IHistogram |
public Meter ( string name, Units unit, TimeUnits rateUnit = TimeUnits.Seconds, string tag = null ) : IMeter | ||
name | string | Name of the metric. Must be unique across all meters in this context. |
unit | Units | Description of what the is being measured ( Unit.Requests , Unit.Items etc ) . |
rateUnit | TimeUnits | Time unit for rates reporting. Defaults to Second ( occurrences / second ). |
tag | string | Optional tag that can be associated with the metric. |
return | IMeter |
public Meter ( string name, string unitName, TimeUnits rateUnit, string tag = null ) : IMeter | ||
name | string | Name of the metric. Must be unique across all meters in this context. |
unitName | string | A Parent name; child counters can be added to this by specifying the this name |
rateUnit | TimeUnits | Time unit for rates reporting. Defaults to Second ( occurrences / second ). |
tag | string | Optional tag that can be associated with the metric. |
return | IMeter |
public MetricsContext ( global context ) : System | ||
context | global | The context. |
return | System |
public ShutdownContext ( string contextName ) : void | ||
contextName | string | Name of the child context to shutdown. |
return | void |
public Timer ( string name, Units unit, SamplingTypes samplingType = SamplingTypes.FavorRecent, TimeUnits rateUnit = TimeUnits.Seconds, TimeUnits durationUnit = TimeUnits.Milliseconds, string tag = null ) : ITimer | ||
name | string | Name of the metric. Must be unique across all timers in this context. |
unit | Units | Description of what the is being measured ( Unit.Requests , Unit.Items etc ) . |
samplingType | SamplingTypes | Type of the sampling to use (see SamplingType for details ). |
rateUnit | TimeUnits | Time unit for rates reporting. Defaults to Second ( occurrences / second ). |
durationUnit | TimeUnits | Time unit for reporting durations. Defaults to Milliseconds. |
tag | string | Optional tag that can be associated with the metric. |
return | ITimer |