Skip to content

Commit 53ee3b9

Browse files
committed
address comments
1 parent 0ebfadc commit 53ee3b9

File tree

6 files changed

+39
-73
lines changed

6 files changed

+39
-73
lines changed

packages/aws_bedrock_agentcore/_dev/build/docs/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ For more details about these requirements, check the [AWS integration documentat
3535
* You can install only one Elastic Agent per host.
3636
* Elastic Agent is required to collect metrics from CloudWatch and ship the data to Elastic, where the events will then be processed through the integration's ingest pipelines.
3737

38+
### How to find the `log_group_arn` (for log-based datasets)
39+
40+
Some datasets in this integration require the ARN of the CloudWatch log group where your AgentCore logs are stored. You can find it by:
41+
42+
- Opening CloudWatch in the AWS Console
43+
- Going to Logs > Log groups
44+
- Selecting the log group used by your AgentCore deployment
45+
- Copying the Log group ARN shown
46+
47+
You can then use this ARN when configuring any log-based dataset.
48+
3849
## Setup
3950

4051
To use the Amazon Bedrock AgentCore metrics, ensure your agents are deployed and running. The integration will automatically collect metrics from the AWS/Bedrock-AgentCore CloudWatch namespace. For enhanced observability, enable detailed monitoring and logging for your AgentCore resources.

packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/_dev/test/pipeline/test-aws-bedrock-agentcore.log-expected.json

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -26,61 +26,13 @@
2626
"outcome": "success"
2727
},
2828
"gen_ai": {
29-
"conversation_id": "090ab333-40ff-49cd-ade1-1527b3a8ede7",
30-
"operation": {
31-
"name": "InvokeAgentRuntime"
32-
},
33-
"prompt": "What is this agent about, this is claudserver?",
34-
"provider": {
35-
"name": "aws"
29+
"conversation": {
30+
"id": "090ab333-40ff-49cd-ade1-1527b3a8ede7"
3631
},
37-
"system": "aws_bedrock_agentcore"
38-
},
39-
"service": {
40-
"name": "AgentCoreCodeRuntime"
41-
},
42-
"span": {
43-
"id": "3f2b2909093d27f3"
44-
},
45-
"tags": [
46-
"preserve_original_event",
47-
"preserve_duplicate_custom_fields"
48-
],
49-
"trace": {
50-
"id": "69082fe91a0ed1872de8e57378fe229b"
51-
}
52-
},
53-
{
54-
"@timestamp": "2025-11-03T04:30:39.907Z",
55-
"aws": {
56-
"bedrock_agentcore": {
57-
"account_id": "627286350134",
58-
"request_id": "136b5865-b303-43a7-b737-3fed1ba17341",
59-
"resource_arn": "arn:aws:bedrock-agentcore:us-east-1:627286350134:runtime/claudeserver-CdBoW2FLP0"
60-
}
61-
},
62-
"cloud": {
63-
"account": {
64-
"id": "627286350134"
65-
},
66-
"provider": "aws",
67-
"service": {
68-
"name": "bedrock-agentcore"
69-
}
70-
},
71-
"ecs": {
72-
"version": "8.11.0"
73-
},
74-
"event": {
75-
"original": "sha1-bbdf20a287f648bad430e94671e9da41e9c430c0:33460",
76-
"outcome": "success"
77-
},
78-
"gen_ai": {
79-
"conversation_id": "090ab333-40ff-49cd-ade1-1527b3a8ede7",
8032
"operation": {
8133
"name": "InvokeAgentRuntime"
8234
},
83-
"prompt_hash": "fa80527c3c86dbbca4fe8e6f605389c2cd02c1cc",
35+
"prompt": "What is this agent about, this is claudserver?",
8436
"provider": {
8537
"name": "aws"
8638
},

packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/elasticsearch/ingest_pipeline/default.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ processors:
8787
# Handle session information
8888
- rename:
8989
field: aws.bedrock_agentcore.session_id
90-
target_field: gen_ai.conversation_id
90+
target_field: gen_ai.conversation.id
9191
ignore_missing: true
9292
- rename:
9393
field: aws.bedrock_agentcore.region
@@ -112,7 +112,7 @@ processors:
112112
if: ctx.gen_ai?.prompt != null && ctx.gen_ai?.prompt instanceof String
113113
source: |
114114
if (ctx.gen_ai.prompt.length() > 32766) {
115-
ctx.gen_ai.prompt_hash = ctx.gen_ai.prompt.sha1();
115+
ctx.aws.bedrock_agentcore.prompt_hash = ctx.gen_ai.prompt.sha1();
116116
ctx.gen_ai.remove("prompt");
117117
}
118118
ignore_failure: true
@@ -155,12 +155,9 @@ processors:
155155
ignore_failure: true
156156

157157
on_failure:
158-
- set:
158+
- set:
159159
field: error.message
160-
value: >-
161-
Processor '{{{ _ingest.on_failure_processor_type }}}'
162-
{{{#_ingest.on_failure_processor_tag}}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
163-
{{{/_ingest.on_failure_processor_tag}}}failed with message '{{{ _ingest.on_failure_message }}}'
160+
value: 'Processor {{{_ingest.on_failure_processor_type}}} with tag {{{_ingest.on_failure_processor_tag}}} in pipeline {{{_ingest.pipeline}}} failed with message: {{{_ingest.on_failure_message}}}'
164161
- set:
165162
field: event.outcome
166163
value: failure

packages/aws_bedrock_agentcore/data_stream/runtime_application_logs/fields/fields.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
type: keyword
1414
description: ID of the request.
1515

16+
- name: prompt_hash
17+
type: text
18+
description: Hash of the user prompt for deduplication purposes.
19+
1620
# Gen AI fields relevant for AgentCore
1721
- name: gen_ai
1822
type: group
@@ -21,7 +25,7 @@
2125
type: keyword
2226
description: Name of the AI system (aws).
2327

24-
- name: conversation_id
28+
- name: conversation.id
2529
type: keyword
2630
description: ID of the conversation.
2731

@@ -33,18 +37,10 @@
3337
type: keyword
3438
description: Name of the provider.
3539

36-
- name: response.timestamp
37-
type: date
38-
description: Timestamp when the response was received.
39-
4040
- name: prompt
4141
type: text
4242
description: The user prompt sent to the AgentCore runtime.
4343

44-
- name: prompt_hash
45-
type: text
46-
description: Hash of the user prompt for deduplication purposes.
47-
4844
- name: request
4945
type: group
5046
fields:

packages/aws_bedrock_agentcore/docs/README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ For more details about these requirements, check the [AWS integration documentat
3535
* You can install only one Elastic Agent per host.
3636
* Elastic Agent is required to collect metrics from CloudWatch and ship the data to Elastic, where the events will then be processed through the integration's ingest pipelines.
3737

38+
### How to find the `log_group_arn` (for log-based datasets)
39+
40+
Some datasets in this integration require the ARN of the CloudWatch log group where your AgentCore logs are stored. You can find it by:
41+
42+
- Opening CloudWatch in the AWS Console
43+
- Going to Logs > Log groups
44+
- Selecting the log group used by your AgentCore deployment
45+
- Copying the Log group ARN shown
46+
47+
You can then use this ARN when configuring any log-based dataset.
48+
3849
## Setup
3950

4051
To use the Amazon Bedrock AgentCore metrics, ensure your agents are deployed and running. The integration will automatically collect metrics from the AWS/Bedrock-AgentCore CloudWatch namespace. For enhanced observability, enable detailed monitoring and logging for your AgentCore resources.
@@ -296,6 +307,7 @@ An example event for `runtime_application` looks as following:
296307
|---|---|---|
297308
| @timestamp | Date/time when the event originated. This is the date/time extracted from the event, typically representing when the event was generated by the source. If the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline. Required field for all events. | date |
298309
| aws.bedrock_agentcore.account_id | ID of the account. | keyword |
310+
| aws.bedrock_agentcore.prompt_hash | Hash of the user prompt for deduplication purposes. | text |
299311
| aws.bedrock_agentcore.request_id | ID of the request. | keyword |
300312
| aws.bedrock_agentcore.resource_arn | The Amazon Resource Name (ARN) of the AgentCore runtime resource. | keyword |
301313
| aws.cloudwatch.message | CloudWatch log message. | text |
@@ -305,13 +317,11 @@ An example event for `runtime_application` looks as following:
305317
| data_stream.type | An overarching type for the data stream. Currently allowed values are "logs" and "metrics". We expect to also add "traces" and "synthetics" in the near future. | constant_keyword |
306318
| event.dataset | Event dataset | constant_keyword |
307319
| event.module | Name of the module this data is coming from. If your monitoring agent supports the concept of modules or plugins to process events of a given source (e.g. Apache logs), `event.module` should contain the name of this module. | constant_keyword |
308-
| gen_ai.conversation_id | ID of the conversation. | keyword |
320+
| gen_ai.conversation.id | ID of the conversation. | keyword |
309321
| gen_ai.operation.name | Name of the operation. | keyword |
310322
| gen_ai.prompt | The user prompt sent to the AgentCore runtime. | text |
311-
| gen_ai.prompt_hash | Hash of the user prompt for deduplication purposes. | text |
312323
| gen_ai.provider.name | Name of the provider. | keyword |
313324
| gen_ai.request.id | Unique identifier for the request. | keyword |
314-
| gen_ai.response.timestamp | Timestamp when the response was received. | date |
315325
| gen_ai.system | Name of the AI system (aws). | keyword |
316326
| host.containerized | If the host is a container. | boolean |
317327
| host.os.build | OS build information. | keyword |

packages/aws_bedrock_agentcore/kibana/dashboard/aws_bedrock_agentcore-3235ab43-8fa0-47f5-9590-b8d7451a4c92.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@
832832
"syncTooltips": false,
833833
"filters": [],
834834
"query": {
835-
"esql": "FROM logs-aws_bedrock_agentcore.runtime_application_logs-default |\nKEEP @timestamp, aws.bedrock_agentcore.request_id, aws.bedrock_agentcore.resource_arn, gen_ai.prompt, trace.id, gen_ai.conversation_id\n| SORT `@timestamp` desc\n| RENAME aws.bedrock_agentcore.request_id as `Request ID`, gen_ai.conversation_id as `Session ID`, trace.id as `Trace ID`, aws.bedrock_agentcore.resource_arn as `Resource ARN`, gen_ai.prompt as `Prompt`, @timestamp as `Timestamp`"
835+
"esql": "FROM logs-aws_bedrock_agentcore.runtime_application_logs-default |\nKEEP @timestamp, aws.bedrock_agentcore.request_id, aws.bedrock_agentcore.resource_arn, gen_ai.prompt, trace.id, gen_ai.conversation.id\n| SORT `@timestamp` desc\n| RENAME aws.bedrock_agentcore.request_id as `Request ID`, gen_ai.conversation.id as `Session ID`, trace.id as `Trace ID`, aws.bedrock_agentcore.resource_arn as `Resource ARN`, gen_ai.prompt as `Prompt`, @timestamp as `Timestamp`"
836836
},
837837
"attributes": {
838838
"title": "Table Timestamp & Request ID & Resource ARN & Prompt & Trace ID",
@@ -844,7 +844,7 @@
844844
"0d3b9a8b-965d-40e4-b6cb-7559a35d0e73": {
845845
"index": "840dc00d90e0cb0f19f52fcd03c115341d02482231833d5487b35b9a5ed8b7de",
846846
"query": {
847-
"esql": "FROM logs-aws_bedrock_agentcore.runtime_application_logs-default |\nKEEP @timestamp, aws.bedrock_agentcore.request_id, aws.bedrock_agentcore.resource_arn, gen_ai.prompt, trace.id, gen_ai.conversation_id\n| SORT `@timestamp` desc\n| RENAME aws.bedrock_agentcore.request_id as `Request ID`, gen_ai.conversation_id as `Session ID`, trace.id as `Trace ID`, aws.bedrock_agentcore.resource_arn as `Resource ARN`, gen_ai.prompt as `Prompt`, @timestamp as `Timestamp`"
847+
"esql": "FROM logs-aws_bedrock_agentcore.runtime_application_logs-default |\nKEEP @timestamp, aws.bedrock_agentcore.request_id, aws.bedrock_agentcore.resource_arn, gen_ai.prompt, trace.id, gen_ai.conversation.id\n| SORT `@timestamp` desc\n| RENAME aws.bedrock_agentcore.request_id as `Request ID`, gen_ai.conversation.id as `Session ID`, trace.id as `Trace ID`, aws.bedrock_agentcore.resource_arn as `Resource ARN`, gen_ai.prompt as `Prompt`, @timestamp as `Timestamp`"
848848
},
849849
"columns": [
850850
{
@@ -987,7 +987,7 @@
987987
},
988988
"filters": [],
989989
"query": {
990-
"esql": "FROM logs-aws_bedrock_agentcore.runtime_application_logs-default |\nKEEP @timestamp, aws.bedrock_agentcore.request_id, aws.bedrock_agentcore.resource_arn, gen_ai.prompt, trace.id, gen_ai.conversation_id\n| SORT `@timestamp` desc\n| RENAME aws.bedrock_agentcore.request_id as `Request ID`, gen_ai.conversation_id as `Session ID`, trace.id as `Trace ID`, aws.bedrock_agentcore.resource_arn as `Resource ARN`, gen_ai.prompt as `Prompt`, @timestamp as `Timestamp`"
990+
"esql": "FROM logs-aws_bedrock_agentcore.runtime_application_logs-default |\nKEEP @timestamp, aws.bedrock_agentcore.request_id, aws.bedrock_agentcore.resource_arn, gen_ai.prompt, trace.id, gen_ai.conversation.id\n| SORT `@timestamp` desc\n| RENAME aws.bedrock_agentcore.request_id as `Request ID`, gen_ai.conversation.id as `Session ID`, trace.id as `Trace ID`, aws.bedrock_agentcore.resource_arn as `Resource ARN`, gen_ai.prompt as `Prompt`, @timestamp as `Timestamp`"
991991
},
992992
"visualization": {
993993
"layerId": "0d3b9a8b-965d-40e4-b6cb-7559a35d0e73",

0 commit comments

Comments
 (0)