-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Description
Description
Hi guys.
For now, to enable observability option in AgentCore, we should additionally set new env vars in our generated runtime (since there are dependency of runtime ID).
To avoid unnecessary action, it will be great to add observability block in aws_bedrockagentcore_agent_runtime resource.
While there may be more detailed options to explore, it would be desired to start by adding the basic observability settings first.
It can be done by using runtime ID as a new env var and enable CloudWatch Transaction Search.
example env:
AGENT_OBSERVABILITY_ENABLED=true
OTEL_PYTHON_DISTRO=aws_distro
OTEL_PYTHON_CONFIGURATOR=aws_configurator # required for ADOT Python only
OTEL_RESOURCE_ATTRIBUTES=service.name=<agent-name>,aws.log.group.names=/aws/bedrock-agentcore/runtimes/<agent-id>,cloud.resource_id=<AgentEndpointArn:AgentEndpointName> # endpoint is optional
OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=/aws/bedrock-agentcore/runtimes/<agent-id>,x-aws-log-stream=runtime-logs,x-aws-metric-namespace=bedrock-agentcore
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_TRACES_EXPORTER=otlp
This issue can be processed when #43424 merged successfully.
Affected Resource(s) or Data Source(s)
aws_bedrockagentcore_agent_runtime
Potential Terraform Configuration
resource "aws_bedrockagentcore_agent_runtime" "test" {
...
observability {
enable = true
...
}
...
}
References
https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability-configure.html
To enable Cloudwatch Transaction Search:
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/xray#Client.UpdateTraceSegmentDestination
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/xray#Client.UpdateIndexingRule
Would you like to implement the enhancement?
Yes