MetricDescriptor class Null safety

Defines a metric type and its schema.

Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable.


MetricDescriptor({String? description, String? displayName, List<LabelDescriptor>? labels, String? launchStage, MetricDescriptorMetadata? metadata, String? metricKind, List<String>? monitoredResourceTypes, String? name, String? type, String? unit, String? valueType})
MetricDescriptor.fromJson(Map json_)


description String?
A detailed description of the metric, which can be used in documentation.
read / write
displayName String?
A concise name for the metric, which can be displayed in user interfaces.
read / write
hashCode int
The hash code for this object.
labels List<LabelDescriptor>?
The set of labels that can be used to describe a specific instance of this metric type.
read / write
launchStage String?
The launch stage of the metric definition.
read / write
metadata MetricDescriptorMetadata?
Metadata which can be used to guide usage of the metric.
read / write
metricKind String?
Whether the metric records instantaneous values, changes to a value, etc.
read / write
monitoredResourceTypes List<String>?
read / write
name String?
The resource name of the metric descriptor.
read / write
runtimeType Type
A representation of the runtime type of the object.
type String?
The metric type, including its DNS name prefix.
read / write
unit String?
The units in which the metric value is reported.
read / write
valueType String?
Whether the measurement is an integer, a floating-point number, etc.
read / write


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toJson() Map<String, dynamic>
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.