选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

MetricDefinition

聚焦模式
MetricDefinition - CloudWatch RUM
此页面尚未翻译为您的语言。 请求翻译

A structure that displays the definition of one extended metric that RUM sends to CloudWatch or CloudWatch Evidently. For more information, see Additional metrics that you can send to CloudWatch and CloudWatch Evidently.

Contents

MetricDefinitionId

The ID of this metric definition.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: Yes

Name

The name of the metric that is defined in this structure.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: Yes

DimensionKeys

This field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch The value of this field is used only if the metric destination is CloudWatch. If the metric destination is Evidently, the value of DimensionKeys is ignored.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 29 items.

Key Length Constraints: Minimum length of 1. Maximum length of 280.

Value Length Constraints: Minimum length of 1. Maximum length of 255.

Value Pattern: ^(?!:).*[^\s].*

Required: No

EventPattern

The pattern that defines the metric. RUM checks events that happen in a user's session against the pattern, and events that match the pattern are sent to the metric destination.

If the metrics destination is CloudWatch and the event also matches a value in DimensionKeys, then the metric is published with the specified dimensions.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 4000.

Required: No

Namespace

If this metric definition is for a custom metric instead of an extended metric, this field displays the metric namespace that the custom metric is published to.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 237.

Pattern: [a-zA-Z0-9-._/#:]+$

Required: No

UnitLabel

Use this field only if you are sending this metric to CloudWatch. It defines the CloudWatch metric unit that this metric is measured in.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Required: No

ValueKey

The field within the event object that the metric value is sourced from.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 280.

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

本页内容

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。