Enumerations

The following enumerations are available globally.

  • Namespace for user metrics

    This is extended by user code (generated by the glean_parser).

    Example

    extension GleanMetrics {
        enum Search {
            /// Running ping counter for this ping. This works as a sequence number to allow
            /// detecting for missing send_in_pings.
            static let counts = CounterMetricType(
                category: "search",
                name: "counts",
                sendInPings: ["metrics"],
                lifetime: .application,
                disabled: false
            )
        }
    }
    

    This will be used by the user as following:

    import Glean
    
    GleanMetrics.Search.counts.add(1)
    

    Declaration

    Swift

    public enum GleanMetrics
  • Default of no extra keys for events.

    An enum with no values for convenient use as the default set of extra keys that an EventMetricType can accept.

    See more

    Declaration

    Swift

    public enum NoExtraKeys : ExtraKeys
  • Enumeration of different metric lifetimes.

    See more

    Declaration

    Swift

    public enum Lifetime : Int32
  • Enumeration of different resolutions supported by the MemoryDistributionMetricType.

    These use the power-of-2 values of these units, that is, Kilobyte is pedantically a Kibibyte.

    See more

    Declaration

    Swift

    public enum MemoryUnit : Int32
  • Default of no reason codes for pings.

    An enum with no values for convenient use as the default set of reason codes that an Ping can accept.

    See more

    Declaration

    Swift

    public enum NoReasonCodes : ReasonCodes
  • Enumeration of different resolutions supported by the TimespanMetricType and TimingDistributionMetricType.

    See more

    Declaration

    Swift

    public enum TimeUnit : Int32
  • Enumeration of different metric lifetimes.

    See more

    Declaration

    Swift

    public enum ErrorType : Int32