data class StringMetricType : CommonMetricData
(source)
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 set method, which takes care of validating the input data and making sure that limits are enforced.
StringMetricType(disabled: Boolean, category: String, lifetime: Lifetime, name: String, sendInPings: List<String>)
This implements the developer facing API for recording string metrics. |
val category: String |
|
val defaultStorageDestinations: List<String>
Defines the names of the storages the metric defaults to when "default" is used as the destination storage. Note that every metric type will need to override this. |
|
val disabled: Boolean |
|
val lifetime: Lifetime |
|
val name: String |
|
val sendInPings: List<String> |
fun set(value: String): Unit
Set a string value. |
open fun getStorageNames(): List<String>
Get the list of storage names the metric will record to. This automatically expands DEFAULT_STORAGE_NAME to the list of default storages for the metric. |
|
open fun shouldRecord(logger: Logger): Boolean |