Classes

The following classes are available globally.

  • Undocumented

    See more

    Declaration

    Swift

    public class Glean
  • This implements the developer facing API for recording boolean 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 boolean API only exposes the BooleanMetricType.set(_:) method, which takes care of validating the input data and making sure that limits are enforced.

    See more

    Declaration

    Swift

    public class BooleanMetricType
  • This implements the developer facing API for recording counter 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 counter API only exposes the CounterMetricType.add(_:) method, which takes care of validating the input data and making sure that limits are enforced.

    See more

    Declaration

    Swift

    public class CounterMetricType
  • 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
  • This class represents the structure of a timing distribution according to the pipeline schema. It is meant to help serialize and deserialize data to the correct format for transport and storage, as well as including a helper function to calculate the bucket sizes.

    @param values a map containing the bucket index mapped to the accumulated count @param sum the accumulated sum of all the samples in the timing distribution

    See more

    Declaration

    Swift

    public class DistributionData
  • 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<ExtraKeysEnum> where ExtraKeysEnum : ExtraKeys
  • This implements the developer facing API for recording JWE 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 JWE API exposes the JweMetricType.set(_:) and JweMetricType.setWithCompactRepresentation(_:) methods, which takes care of validating the input data.

    See more

    Declaration

    Swift

    public class JweMetricType
  • 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 recording memory distribution 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 memory distribution API only exposes the MemoryDistributionMetricType.accumulate() method.

    See more

    Declaration

    Swift

    public class MemoryDistributionMetricType
  • A base class for functionality across all Ping

    See more

    Declaration

    Swift

    public class PingBase
  • 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> : PingBase where ReasonCodesEnum : ReasonCodes
  • This implements the developer facing API for recording string list 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 string list API only exposes the StringListMetricType.add(_:) and StringListMetricType.set(_:) methods, which takes care of validating the input data and making sure that limits are enforced.

    See more

    Declaration

    Swift

    public class StringListMetricType
  • This implements the developer facing API for recording string 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 string API only exposes the StringMetricType.set(_:) method, which takes care of validating the input data and making sure that limits are enforced.

    See more

    Declaration

    Swift

    public class StringMetricType
  • This implements the developer facing API for recording timespan 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 timespan API only exposes the TimespanMetricType.start(), TimespanMetricType.stop() and TimespanMetricType.cancel() methods.

    See more

    Declaration

    Swift

    public class TimespanMetricType
  • This implements the developer facing API for recording timing distribution 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 timing distribution API only exposes the TimingDistributionMetricType.start(), TimingDistributionMetricType.stopAndAccumulate(_:) and TimingDistributionMetricType.cancel(_:) methods.

    See more

    Declaration

    Swift

    public class TimingDistributionMetricType
  • 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