docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)