Skip to content

Commit 81d355d

Browse files
fix bedrock metrics with split namespaces (#356)
1 parent 3703bc9 commit 81d355d

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

pkg/cloudWatchConsts/metrics.go

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -313,33 +313,49 @@ var NamespaceMetricsMap = map[string][]string{
313313
"NumberOfRestoreJobsRunning",
314314
},
315315
"AWS/Bedrock": {
316-
"FindingCounts",
317316
"InputTokenCount",
318317
"InvocationClientErrors",
319318
"InvocationLatency",
320319
"InvocationServerErrors",
321320
"InvocationThrottles",
322321
"Invocations",
323-
"InvocationsIntervened",
324-
"Latency",
325322
"LegacyModelInvocations",
326-
"ModelInvocationClientErrors",
327-
"ModelInvocationCount",
328323
"ModelInvocationLargeDataS3DeliveryFailure",
329324
"ModelInvocationLargeDataS3DeliverySuccess",
330325
"ModelInvocationLogsCloudWatchDeliveryFailure",
331326
"ModelInvocationLogsCloudWatchDeliverySuccess",
332327
"ModelInvocationLogsS3DeliveryFailure",
333328
"ModelInvocationLogsS3DeliverySuccess",
329+
"OutputImageCount",
330+
"OutputTokenCount",
331+
},
332+
"AWS/Bedrock/Agents": {
333+
"InputTokenCount",
334+
"InvocationClientErrors",
335+
"InvocationCount",
336+
"InvocationServerErrors",
337+
"InvocationThrottles",
338+
"ModelInvocationClientErrors",
339+
"ModelInvocationCount",
334340
"ModelInvocationServerErrors",
335341
"ModelInvocationThrottles",
336342
"ModelLatency",
337-
"OutputImageCount",
338343
"OutputTokenCount",
339344
"TTFT",
345+
"TotalTime",
346+
},
347+
"AWS/Bedrock/Guardrails": {
348+
"FindingCounts",
349+
"InputTokenCount",
350+
"InvocationClientErrors",
351+
"InvocationLatency",
352+
"InvocationServerErrors",
353+
"InvocationThrottles",
354+
"Invocations",
355+
"InvocationsIntervened",
356+
"Latency",
340357
"TextUnitCount",
341358
"TotalFindings",
342-
"TotalTime",
343359
},
344360
"AWS/Billing": {
345361
"EstimatedCharges",
@@ -3416,7 +3432,9 @@ var NamespaceDimensionKeysMap = map[string][]string{
34163432
"AWS/Athena": {"QueryState", "QueryType", "WorkGroup"},
34173433
"AWS/AutoScaling": {"AutoScalingGroupName", "PairIndex", "PolicyName"},
34183434
"AWS/Backup": {"BackupVaultName", "ResourceType"},
3419-
"AWS/Bedrock": {"AgentAliasArn", "BucketedStepSize", "FindingType", "GuardrailArn", "GuardrailContentSource", "GuardrailPolicyType", "GuardrailVersion", "ImageSize", "ModelId", "Operation", "PolicyArn", "PolicyVersion"},
3435+
"AWS/Bedrock": {"BucketedStepSize", "ImageSize", "ModelId"},
3436+
"AWS/Bedrock/Agents": {"AgentAliasArn", "ModelId", "Operation"},
3437+
"AWS/Bedrock/Guardrails": {"FindingType", "GuardrailArn", "GuardrailContentSource", "GuardrailPolicyType", "GuardrailVersion", "Operation", "PolicyArn", "PolicyVersion"},
34203438
"AWS/Billing": {"Currency", "LinkedAccount", "ServiceName"},
34213439
"AWS/CertificateManager": {"CertificateArn"},
34223440
"AWS/Chatbot": {"ConfigurationName"},

0 commit comments

Comments
 (0)