Interface IMetrics
Object used to send metrics events to the backend.
Namespace: Unity.Services.Core.Telemetry.Internal
Assembly: Unity.Services.Core.Internal.dll
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. |