Interface IMetrics
Object used to send metrics events to the backend.
Namespace: Unity.Services.Core.Telemetry.Internal
Syntax
public interface IMetrics
Methods
SendGaugeMetric(String, Double, IDictionary<String, String>)
Send a metric that can arbitrarily go up or down to the telemetry service.
Declaration
void SendGaugeMetric(string name, double value = 0, IDictionary<string, string> tags = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | Name of the event. |
| Double | value | Value of the metric. |
| IDictionary<String, String> | tags | Event tags. |
SendHistogramMetric(String, Double, IDictionary<String, String>)
Send a metric that lasts over time to the telemetry service.
Declaration
void SendHistogramMetric(string name, double time, IDictionary<string, string> tags = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | Name of the event. |
| Double | time | Duration of the operation the event is tracking. |
| IDictionary<String, String> | tags | Event tags. |
SendSumMetric(String, Double, IDictionary<String, String>)
Send a metric that can only be incremented to the telemetry service.
Declaration
void SendSumMetric(string name, double value = 1, IDictionary<string, string> tags = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | Name of the event. |
| Double | value | Value of the metric. |
| IDictionary<String, String> | tags | Event tags. |