MetricDescriptor class final
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.
- Inheritance
-
- Object
- ProtoMessage
- MetricDescriptor
Constructors
-
MetricDescriptor({String name = '', String type = '', List<
LabelDescriptor> labels = const [], MetricDescriptor_MetricKind metricKind = MetricDescriptor_MetricKind.$default, MetricDescriptor_ValueType valueType = MetricDescriptor_ValueType.$default, String unit = '', String description = '', String displayName = '', MetricDescriptor_MetricDescriptorMetadata? metadata, LaunchStage launchStage = LaunchStage.$default, List<String> monitoredResourceTypes = const []}) - MetricDescriptor.fromJson(Object? j)
-
factory
Properties
- description → String
-
A detailed description of the metric, which can be used in documentation.
final
- displayName → String
-
A concise name for the metric, which can be displayed in user interfaces.
Use sentence case without an ending period, for example "Request count".
This field is optional but it is recommended to be set for any metrics
associated with user-visible concepts, such as Quota.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
labels
→ List<
LabelDescriptor> -
The set of labels that can be used to describe a specific
instance of this metric type. For example, the
appengine.googleapis.com/http/server/response_latenciesmetric type has a label for the HTTP response code,response_code, so you can look at latencies for successful responses or just for responses that failed.final - launchStage → LaunchStage
-
Optional. The launch stage of the metric definition.
final
- metadata → MetricDescriptor_MetricDescriptorMetadata?
-
Optional. Metadata which can be used to guide usage of the metric.
final
- metricKind → MetricDescriptor_MetricKind
-
Whether the metric records instantaneous values, changes to a value, etc.
Some combinations of
metric_kindandvalue_typemight not be supported.final -
monitoredResourceTypes
→ List<
String> -
Read-only. If present, then a
google.monitoring.v3.TimeSeries, which is identified partially by a metric type and aMonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here.final - name → String
-
The resource name of the metric descriptor.
final
- qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
The metric type, including its DNS name prefix. The type is not
URL-encoded. All user-defined metric types have the DNS name
custom.googleapis.comorexternal.googleapis.com. Metric types should use a natural hierarchical grouping. For example:final - unit → String
-
The units in which the metric value is reported. It is only applicable
if the
value_typeisINT64,DOUBLE, orDISTRIBUTION. Theunitdefines the representation of the stored metric values.final - valueType → MetricDescriptor_ValueType
-
Whether the measurement is an integer, a floating-point number, etc.
Some combinations of
metric_kindandvalue_typemight not be supported.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String