[android-components](../../index.md) / [mozilla.components.service.glean.private](../index.md) / [CustomDistributionMetricType](index.md) / [&lt;init&gt;](./-init-.md)

# &lt;init&gt;

`CustomDistributionMetricType(disabled: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, category: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, lifetime: `[`Lifetime`](../-lifetime/index.md)`, name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, sendInPings: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>, rangeMin: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, rangeMax: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, bucketCount: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, histogramType: `[`HistogramType`](../-histogram-type/index.md)`)`

This implements the developer facing API for recording custom distribution metrics.

Custom distributions are histograms with the following parameters that are settable on a
per-metric basis:

```
    - `rangeMin`/`rangeMax`: The minimum and maximum values
    - `bucketCount`: The number of histogram buckets
    - `histogramType`: Whether the bucketing is linear or exponential
```

This metric exists primarily for backward compatibility with histograms in
legacy (pre-Glean) telemetry, and its use is not recommended for newly-created
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.

