Amazon Linux release 2 (Karoo) [ami-02c21308fed24a8ab]
Software/API Version
No response
Error Message
As part of our testing AWS Bedrock Integration for Detections, we have found that there is a slight difference in the filed mapping for AWS Bedrock Guardrail events. I have configured a test guardrail with a Denied topic and run a test ( image attached) . The sample log ingested is attached.
We do not see filed mappings for gen_ai.policy.action, gen_ai.policy.confidencegen_ai.compliance.violation_code
All of these, are present in filed gen_ai.completion as the below value.
{"metrics":{"latencyMs":271},"output":{"message":{"content":[{"text":"Sorry, the model cannot answer this question."}],"role":"assistant"}},"stopReason":"guardrail_intervened","trace":{"guardrail":{"inputAssessment":{"l7n9e426howe":{"contentPolicy":{"filters":[{"action":"BLOCKED","confidence":"HIGH","type":"MISCONDUCT"}]},"topicPolicy":{"topics":[{"action":"BLOCKED","name":"Robbing A Bank","type":"DENY"}]}}}}},"usage":{"inputTokens":0,"outputTokens":0,"totalTokens":0}}
I am looking at the code of aws_bedrock integration from here, which gets get_guardrail_details
It checks for
if (e.amazon_bedrock_guardrail_action == 'INTERVENED') {
and then maps the field gen_ai gen_ai.policygen_ai.compliancegen_ai.compliance.violation_detected and all other fields
If you look at the latest logs now have something called guardrail_intervened instead of just INTERVENED, could this be the reason for the changes and these fileds not getting mapped
Integration Name
AWS Bedrock [aws_bedrock]
Dataset Name
logs-aws_bedrock.invocation
Integration Version
Beta v0.5.0
Agent Version
8.15.0
Agent Output Type
elasticsearch
Elasticsearch Version
8.15.0
OS Version and Architecture
Amazon Linux release 2 (Karoo) [ami-02c21308fed24a8ab]
Software/API Version
No response
Error Message
As part of our testing AWS Bedrock Integration for Detections, we have found that there is a slight difference in the filed mapping for AWS Bedrock Guardrail events. I have configured a test guardrail with a Denied topic and run a test ( image attached) . The sample log ingested is attached. We do not see filed mappings for
gen_ai.policy.action
,gen_ai.policy.confidence
gen_ai.compliance.violation_code
All of these, are present in filed gen_ai.completion as the below value.I am looking at the code of aws_bedrock integration from here, which gets get_guardrail_details
It checks for
if (e.amazon_bedrock_guardrail_action == 'INTERVENED') {
and then maps the fieldgen_ai gen_ai.policy
gen_ai.compliance
gen_ai.compliance.violation_detected
and all other fieldsIf you look at the latest logs now have something called
guardrail_intervened
instead of justINTERVENED
, could this be the reason for the changes and these fileds not getting mappedEvent Original
What did you do?
Tested AWS BedRock Guardrail
What did you see?
What did you expect to see?
Filed Mappings for
gen_ai.policy.action
,gen_ai.policy.confidence
gen_ai.compliance.violation_code
Anything else?
No response