Interface MetricMetadata.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<MetricMetadata.Builder,,MetricMetadata> SdkBuilder<MetricMetadata.Builder,,MetricMetadata> SdkPojo
- Enclosing class:
MetricMetadata
-
Method Summary
Modifier and TypeMethodDescriptionattributes(Map<String, String> attributes) Per-metric qualifying attributes the console uses to query this metric's telemetry.metricType(String metricType) OTel metric kind: "gauge", "sum", "histogram", "exponential_histogram", or "summary" (CloudWatch-vended metrics carry the same kinds).The metric name as emitted, such as "Duration".Deprecated.Use attributes['service.namespace']; retained for backward compatibility.preferredStat(String preferredStat) The statistic to chart or alarm on, such as "p99" or "Sum".default MetricMetadata.Buildersemantics(Consumer<MetricSemantics.Builder> semantics) What the metric means and the unit it is reported in.semantics(MetricSemantics semantics) What the metric means and the unit it is reported in.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
name
The metric name as emitted, such as "Duration".
- Parameters:
name- The metric name as emitted, such as "Duration".- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
namespace
Deprecated.Use attributes['service.namespace']; retained for backward compatibility.DEPRECATED: read attributes["service.namespace"] instead. Retained (deprecated) for backward compatibility with existing consumers; will be removed once they migrate. The logical service grouping the metric belongs to.
- Parameters:
namespace- DEPRECATED: read attributes["service.namespace"] instead. Retained (deprecated) for backward compatibility with existing consumers; will be removed once they migrate. The logical service grouping the metric belongs to.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
preferredStat
The statistic to chart or alarm on, such as "p99" or "Sum". Free-form and frequently absent.
- Parameters:
preferredStat- The statistic to chart or alarm on, such as "p99" or "Sum". Free-form and frequently absent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metricType
OTel metric kind: "gauge", "sum", "histogram", "exponential_histogram", or "summary" (CloudWatch-vended metrics carry the same kinds). Absent when the producer did not report one.
- Parameters:
metricType- OTel metric kind: "gauge", "sum", "histogram", "exponential_histogram", or "summary" (CloudWatch-vended metrics carry the same kinds). Absent when the producer did not report one.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
attributes
Per-metric qualifying attributes the console uses to query this metric's telemetry. These are the RAW, store-matching values keyed by their OTel names ("service.name", "service.namespace", "cloud.provider", "cloud.account.id", "cloud.region", "instrumentation_scope") — deliberately NOT the node's normalized/merged identity, so the query selectors match the emitted series. A merged node can carry different values per metric, which is why they live here rather than on the node.
- Parameters:
attributes- Per-metric qualifying attributes the console uses to query this metric's telemetry. These are the RAW, store-matching values keyed by their OTel names ("service.name", "service.namespace", "cloud.provider", "cloud.account.id", "cloud.region", "instrumentation_scope") — deliberately NOT the node's normalized/merged identity, so the query selectors match the emitted series. A merged node can carry different values per metric, which is why they live here rather than on the node.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
semantics
What the metric means and the unit it is reported in.
- Parameters:
semantics- What the metric means and the unit it is reported in.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
semantics
What the metric means and the unit it is reported in.
This is a convenience method that creates an instance of theMetricSemantics.Builderavoiding the need to create one manually viaMetricSemantics.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosemantics(MetricSemantics).- Parameters:
semantics- a consumer that will call methods onMetricSemantics.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-