View a markdown version of this page

AgentCore 在 AgentCore 可觀測性資料中產生的政策 - Amazon Bedrock AgentCore

AgentCore 在 AgentCore 可觀測性資料中產生的政策

對於政策和政策引擎資源類型,Amazon Bedrock AgentCore 預設會將調用指標發佈至 CloudWatch。為連接的 AgentCore Gateway 資源啟用追蹤時,可以使用其他跨度資料,這會在 AgentCore 相關操作中發出政策跨度。請參閱啟用 AgentCore 執行期、記憶體、閘道、內建工具和身分資源的可觀測性,以進一步了解啟用。

提供的指標資料

Amazon Bedrock AgentCore 預設會將下列調用指標發佈至 AWS/Bedrock-AgentCore CloudWatch 命名空間。這些指標可用於觀察和監控政策評估和整體效能。

指標 說明 單位

調用

對服務提出的請求數量

計數

SystemErrors

伺服器端錯誤數目 (5xx)

計數

UserErrors

用戶端錯誤的數量 (4xx)

計數

延遲

從傳送請求到接收回應所經過的總時間

毫秒

AllowDecisions

導致 ALLOW 的決策數量

計數

DenyDecisions

導致 DENY 的決策數量

計數

TotalMismatchedPolicies

由於缺少屬性或類型不相符,特定請求的失敗政策數量

計數

PolicyMismatch

因缺少屬性或類型不相符而導致特定政策的失敗次數

計數

MismatchErrors

由於至少一個不相符政策而失敗的請求數量

計數

DeterminingPolicies

決定請求政策的數量

計數

NoDeterminingPolicies

由於沒有決定政策而拒絕的請求數量

計數

指標維度

下列維度適用於上述指標。這些維度可讓您在更精細的細節層級篩選和分析指標資料。

維度 說明

OperationName

API 操作的名稱,有效值為 AuthorizeActionPartiallyAuthorizeActions

PolicyEngine

與指標相關聯的政策引擎識別符

政策

與指標相關聯的政策識別符

TargetResource

與請求相關聯的 AgentCore Gateway 資源識別符

ToolName

指標套用到的工具名稱

Mode

在 AgentCore Gateway 上設定的強制執行模式,有效值為 LOG_ONLYENFORCE

提供的跨度資料

Amazon Bedrock AgentCore 透過 AgentCore Gateway 可觀測性提供額外的結構化跨度資料,提供更深入的 API 調用洞察。AgentCore 跨度資料中的政策會在啟用 AgentCore Gateway 資源的追蹤後提供,並且可以在 CloudWatch aws/spans日誌群組中找到。

作業 跨度屬性 說明

AuthorizeAction

aws.agentcore.policy.authorization_decision

評估政策之後的授權決策,有效值為 ALLOWDENY

aws.agentcore.policy.authorization_reason

授權決策的原因

aws.agentcore.policy.determining_policies

決定決策結果的政策識別符清單

aws.agentcore.policy.mismatched_policies

由於缺少屬性或類型不相符而失敗的政策識別符清單

aws.agentcore.policy.target_resource.id

套用請求的 AgentCore Gateway 資源識別符

aws.agentcore.gateway.policy.arn

在 AgentCore Gateway 上設定的 政策引擎 Amazon Resource Name (ARN)

aws.agentcore.gateway.policy.mode

在 AgentCore Gateway 上設定的政策引擎強制執行模式,有效值為 LOG_ONLYENFORCE

PartiallyAuthorizeActions

aws.agentcore.policy.allowed_tools

評估為ALLOW決策的工具名稱清單

aws.agentcore.policy.denied_tools

評估為DENY決策的工具名稱清單

aws.agentcore.policy.target_resource.id

套用請求的 AgentCore Gateway 資源識別符

aws.agentcore.gateway.policy.arn

在 AgentCore Gateway 上設定的 政策引擎 Amazon Resource Name (ARN)

aws.agentcore.gateway.policy.mode

在 AgentCore Gateway 上設定的政策引擎強制執行模式,有效值為 LOG_ONLYENFORCE