Classes

The following classes are available globally.

  • Undocumented

    See more

    Declaration

    Swift

    open class BooleanMetric : BooleanMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class CounterMetric : CounterMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class CustomDistributionMetric : CustomDistributionMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class DatetimeMetric : DatetimeMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class DenominatorMetric : DenominatorMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class EventMetric : EventMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class LabeledBoolean : LabeledBooleanProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class LabeledCounter : LabeledCounterProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class LabeledString : LabeledStringProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class MemoryDistributionMetric : MemoryDistributionMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class NumeratorMetric : NumeratorMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class ObjectMetric : ObjectMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class PingType : PingTypeProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class QuantityMetric : QuantityMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class RateMetric : RateMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class StringListMetric : StringListMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class StringMetric : StringMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class TextMetric : TextMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class TimespanMetric : TimespanMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class TimingDistributionMetric : TimingDistributionMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class UrlMetric : UrlMetricProtocol, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Swift

    open class UuidMetric : UuidMetricProtocol, @unchecked Sendable
  • The main Glean API.

    This is exposed through the global Glean.shared object.

    See more

    Declaration

    Swift

    public class Glean
  • This implements the developer facing API for recording datetime metrics.

    Instances of this class type are automatically generated by the parsers at build time, allowing developers to record values that were previously registered in the metrics.yaml file.

    The datetime API only exposes the DatetimeMetricType.set(_:) method, which takes care of validating the input data and making sure that limits are enforced.

    See more

    Declaration

    Swift

    public class DatetimeMetricType
  • Default of no extra keys for events (for the new API).

    An empty class for convenient use as the default set of extra keys that an EventMetricType can accept.

    See more

    Declaration

    Swift

    public class NoExtras : EventExtras
  • This implements the developer facing API for recording events.

    Instances of this class type are automatically generated by the parsers at built time, allowing developers to record events that were previously registered in the metrics.yaml file.

    The Events API only exposes the EventMetricType.record(extra:) method, which takes care of validating the input data and making sure that limits are enforced.

    See more

    Declaration

    Swift

    public class EventMetricType<ExtraObject> where ExtraObject : EventExtras
  • This implements the developer facing API for labeled metrics.

    Instances of this class type are automatically generated by the parsers at build time, allowing developers to record values that were previously registered in the metrics.yaml file.

    Unlike most metric types, LabeledMetricType does not have its own corresponding storage engine, but records metrics for the underlying metric type T in the storage engine for that type. The only difference is that labeled metrics are stored with the special key $category.$name/$label.

    See more

    Declaration

    Swift

    public class LabeledMetricType<T>
  • This implements the developer facing API for the object metric type.

    Instances of this class type are automatically generated by the parsers at built time, allowing developers to record events that were previously registered in the metrics.yaml file.

    The Events API only exposes the ObjectMetricType.set(obj:) method, which takes care of validating the input data and making sure that limits are enforced.

    See more

    Declaration

    Swift

    public class ObjectMetricType<K> where K : ObjectSerialize
  • This implements the developer facing API for custom pings.

    Instances of this class type are automatically generated by the parsers at build time.

    The Ping API only exposes the Ping.sumbit() method, which collects and schedules a ping for eventual upload.

    See more

    Declaration

    Swift

    public class Ping<ReasonCodesEnum> where ReasonCodesEnum : ReasonCodes
  • This implements the developer facing API for recording URL metrics.

    Instances of this class type are automatically generated by the parsers at build time, allowing developers to record values that were previously registered in the metrics.yaml file.

    The URL API only exposes the UrlMetricType.set(_:) method, which takes care of validating the input data and making sure that limits are enforced.

    See more

    Declaration

    Swift

    public class UrlMetricType
  • This implements the developer facing API for recording UUID metrics.

    Instances of this class type are automatically generated by the parsers at build time, allowing developers to record values that were previously registered in the metrics.yaml file.

    The UUID API only exposes the UuidMetricType.generateAndSet() and UuidMetricType.set(_:) methods, which takes care of validating the input data and making sure that limits are enforced.

    See more

    Declaration

    Swift

    public class UuidMetricType
  • This class represents a ping uploader via HTTP.

    This will typically be invoked by the appropriate scheduling mechanism to upload a ping to the server.

    See more

    Declaration

    Swift

    public class HttpPingUploader