CloudWatchLogsDataSourceConfig

class aws_cdk.aws_bedrockagentcore.CloudWatchLogsDataSourceConfig(*, log_group_names, service_names)

Bases: object

Configuration for CloudWatch Logs data source.

Parameters:
  • log_group_names (Sequence[str]) – The list of CloudWatch log group names to monitor for agent traces.

  • service_names (Sequence[str]) – The list of service names to filter traces within the specified log groups. Used to identify relevant agent sessions. For agents hosted on AgentCore Runtime, service name follows the format: <agent-runtime-name>.<agent-runtime-endpoint-name>

ExampleMetadata:

fixture=default infused

Example:

evaluation = agentcore.OnlineEvaluationConfig(self, "MyEvaluation",
    online_evaluation_config_name="my_evaluation",
    evaluators=[
        agentcore.EvaluatorSelector.builtin(agentcore.BuiltinEvaluator.HELPFULNESS),
        agentcore.EvaluatorSelector.builtin(agentcore.BuiltinEvaluator.CORRECTNESS)
    ],
    data_source=agentcore.DataSourceConfig.from_cloud_watch_logs(
        log_group_names=["/aws/bedrock-agentcore/my-agent"],
        service_names=["my-agent.default"]
    )
)

Attributes

log_group_names

The list of CloudWatch log group names to monitor for agent traces.

Maximum:

5

Minimum:

1

service_names

The list of service names to filter traces within the specified log groups. Used to identify relevant agent sessions.

For agents hosted on AgentCore Runtime, service name follows the format: <agent-runtime-name>.<agent-runtime-endpoint-name>

Maximum:

1

Minimum:

1