-
Notifications
You must be signed in to change notification settings - Fork 515
[amazon_bedrock_agentcore] add runtime_application_logs data stream
#15991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 18 commits
4cdbe25
21ddd0e
9182cf0
4d06423
c9faea5
a953aa9
c873bed
bbe0c10
2fc9ee4
39996cd
0a43cbb
3088a7a
0ebfadc
53ee3b9
e7bb9a9
05b69ff
5c2712d
67dce02
920216e
391937f
a404df2
cb1d145
2b39bcf
5e57de4
390ec23
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,9 @@ | ||
| # newer versions go on top | ||
| - version: "0.0.2" | ||
| changes: | ||
| - description: Add `runtime_application_logs` data stream. | ||
| type: enhancement | ||
| link: https://github.com/elastic/integrations/pull/999 | ||
|
||
| - version: "0.0.1" | ||
| changes: | ||
| - description: Initial draft of the package | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"resource_arn": "arn:aws:bedrock-agentcore:us-east-1:627286350134:runtime/claudeserver-CdBoW2FLP0", "event_timestamp": 1762144239907, "account_id": "627286350134", "request_id": "136b5865-b303-43a7-b737-3fed1ba17341", "session_id": "090ab333-40ff-49cd-ade1-1527b3a8ede7", "span_id": "3f2b2909093d27f3", "trace_id": "69082fe91a0ed1872de8e57378fe229b", "service_name": "AgentCoreCodeRuntime", "operation": "InvokeAgentRuntime", "request_payload":{"prompt": "What is this agent about, this is claudserver?"}} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| { | ||
| "expected": [ | ||
| { | ||
| "@timestamp": "2025-11-03T04:30:39.907Z", | ||
| "aws": { | ||
| "bedrock_agentcore": { | ||
| "account_id": "627286350134", | ||
| "request_id": "136b5865-b303-43a7-b737-3fed1ba17341", | ||
| "resource_arn": "arn:aws:bedrock-agentcore:us-east-1:627286350134:runtime/claudeserver-CdBoW2FLP0" | ||
| } | ||
| }, | ||
| "cloud": { | ||
| "account": { | ||
| "id": "627286350134" | ||
| }, | ||
| "provider": "aws", | ||
| "service": { | ||
| "name": "bedrock-agentcore" | ||
| } | ||
| }, | ||
| "ecs": { | ||
| "version": "8.11.0" | ||
| }, | ||
| "event": { | ||
| "original": "{\"resource_arn\": \"arn:aws:bedrock-agentcore:us-east-1:627286350134:runtime/claudeserver-CdBoW2FLP0\", \"event_timestamp\": 1762144239907, \"account_id\": \"627286350134\", \"request_id\": \"136b5865-b303-43a7-b737-3fed1ba17341\", \"session_id\": \"090ab333-40ff-49cd-ade1-1527b3a8ede7\", \"span_id\": \"3f2b2909093d27f3\", \"trace_id\": \"69082fe91a0ed1872de8e57378fe229b\", \"service_name\": \"AgentCoreCodeRuntime\", \"operation\": \"InvokeAgentRuntime\", \"request_payload\":{\"prompt\": \"What is this agent about, this is claudserver?\"}}", | ||
| "outcome": "success" | ||
| }, | ||
| "gen_ai": { | ||
| "conversation": { | ||
| "id": "090ab333-40ff-49cd-ade1-1527b3a8ede7" | ||
| }, | ||
| "operation": { | ||
| "name": "InvokeAgentRuntime" | ||
| }, | ||
| "prompt": "What is this agent about, this is claudserver?", | ||
| "provider": { | ||
| "name": "aws" | ||
| }, | ||
| "system": "aws_bedrock_agentcore" | ||
| }, | ||
| "service": { | ||
| "name": "AgentCoreCodeRuntime" | ||
| }, | ||
| "span": { | ||
| "id": "3f2b2909093d27f3" | ||
| }, | ||
| "tags": [ | ||
| "preserve_original_event", | ||
| "preserve_duplicate_custom_fields" | ||
| ], | ||
| "trace": { | ||
| "id": "69082fe91a0ed1872de8e57378fe229b" | ||
| } | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| fields: | ||
| tags: | ||
| - preserve_original_event | ||
| - preserve_duplicate_custom_fields |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| {{#unless log_group_name}} | ||
| {{#unless log_group_name_prefix}} | ||
| {{#if log_group_arn }} | ||
| log_group_arn: {{ log_group_arn }} | ||
| {{/if}} | ||
| {{/unless}} | ||
| {{/unless}} | ||
|
|
||
| {{#unless log_group_arn}} | ||
| {{#unless log_group_name}} | ||
| {{#if log_group_name_prefix }} | ||
| log_group_name_prefix: {{ log_group_name_prefix }} | ||
| {{/if}} | ||
| {{#if include_linked_accounts_with_prefix }} | ||
| include_linked_accounts_for_prefix_mode: {{ include_linked_accounts_with_prefix }} | ||
| {{/if}} | ||
| {{#if number_of_workers }} | ||
| number_of_workers: {{ number_of_workers }} | ||
| {{/if}} | ||
| {{/unless}} | ||
| {{/unless}} | ||
|
|
||
| {{#unless log_group_arn}} | ||
| {{#unless log_group_name_prefix}} | ||
| {{#if log_group_name }} | ||
| log_group_name: {{ log_group_name }} | ||
| {{/if}} | ||
| {{/unless}} | ||
| {{/unless}} | ||
|
|
||
| {{#unless log_group_arn}} | ||
| region_name: {{ region_name }} | ||
| {{/unless}} | ||
|
|
||
| {{#unless log_stream_prefix}} | ||
| {{#if log_streams }} | ||
| log_streams: {{ log_streams }} | ||
| {{/if}} | ||
| {{/unless}} | ||
|
|
||
| {{#unless log_streams}} | ||
| {{#if log_stream_prefix }} | ||
| log_stream_prefix: {{ log_stream_prefix }} | ||
| {{/if}} | ||
| {{/unless}} | ||
|
|
||
| {{#if start_position }} | ||
| start_position: {{ start_position }} | ||
| {{/if}} | ||
|
|
||
| {{#if scan_frequency }} | ||
| scan_frequency: {{ scan_frequency }} | ||
| {{/if}} | ||
|
|
||
| {{#if api_sleep }} | ||
| api_sleep: {{ api_sleep }} | ||
| {{/if}} | ||
|
|
||
| {{#if latency }} | ||
| latency: {{ latency }} | ||
| {{/if}} | ||
|
|
||
| {{#if credential_profile_name}} | ||
| credential_profile_name: {{credential_profile_name}} | ||
| {{/if}} | ||
| {{#if shared_credential_file}} | ||
| shared_credential_file: {{shared_credential_file}} | ||
| {{/if}} | ||
| {{#if api_timeout}} | ||
| api_timeout: {{api_timeout}} | ||
| {{/if}} | ||
| {{#if default_region}} | ||
| default_region: {{default_region}} | ||
| {{/if}} | ||
| {{#if access_key_id}} | ||
| access_key_id: {{access_key_id}} | ||
| {{/if}} | ||
| {{#if secret_access_key}} | ||
| secret_access_key: {{secret_access_key}} | ||
| {{/if}} | ||
| {{#if session_token}} | ||
| session_token: {{session_token}} | ||
| {{/if}} | ||
| {{#if role_arn}} | ||
| role_arn: {{role_arn}} | ||
| {{/if}} | ||
| {{#if proxy_url }} | ||
| proxy_url: {{proxy_url}} | ||
| {{/if}} | ||
| tags: | ||
| {{#if preserve_original_event}} | ||
| - preserve_original_event | ||
| {{/if}} | ||
| {{#if preserve_duplicate_custom_fields}} | ||
| - preserve_duplicate_custom_fields | ||
| {{/if}} | ||
| {{#each tags as |tag|}} | ||
| - {{tag}} | ||
| {{/each}} | ||
| {{#contains "forwarded" tags}} | ||
| publisher_pipeline.disable_host: true | ||
| {{/contains}} | ||
| {{#if processors}} | ||
| processors: | ||
| {{processors}} | ||
| {{/if}} |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,163 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||||||||||
| description: Pipeline for Amazon Bedrock AgentCore runtime application logs | ||||||||||||||||||||||||||||||||||||||||||||||||||
| processors: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - rename: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| field: message | ||||||||||||||||||||||||||||||||||||||||||||||||||
| target_field: event.original | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if: 'ctx.event?.original == null' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| description: 'Store original message in event.original' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ignore_missing: true | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| - remove: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| field: message | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ignore_missing: true | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if: ctx.event?.original != null | ||||||||||||||||||||||||||||||||||||||||||||||||||
| description: 'The `message` field is no longer required if the document has an `event.original` field.' | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| # Parse JSON if the log comes as a string | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - json: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| field: event.original | ||||||||||||||||||||||||||||||||||||||||||||||||||
| target_field: aws.bedrock_agentcore | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if: 'ctx.event?.original != null' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ignore_failure: true | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| # Set ECS version | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - set: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| field: ecs.version | ||||||||||||||||||||||||||||||||||||||||||||||||||
| value: '8.11.0' | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| # Set cloud service metadata | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - set: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| field: cloud.service.name | ||||||||||||||||||||||||||||||||||||||||||||||||||
| value: bedrock-agentcore | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| - set: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| field: cloud.provider | ||||||||||||||||||||||||||||||||||||||||||||||||||
| value: aws | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| - set: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| field: gen_ai.provider.name | ||||||||||||||||||||||||||||||||||||||||||||||||||
| value: aws | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| Value | Description | Stability |
|---|---|---|
| anthropic | Anthropic | Development |
| aws.bedrock | AWS Bedrock | Development |
| azure.ai.inference | Azure AI Inference | Development |
| azure.ai.openai | Azure OpenAI | Development |
| cohere | Cohere | Development |
| deepseek | DeepSeek | Development |
| gcp.gemini | Gemini [14] | Development |
| gcp.gen_ai | Any Google generative AI endpoint [15] | Development |
| gcp.vertex_ai | Vertex AI [16] | Development |
| groq | Groq | Development |
| ibm.watsonx.ai | IBM Watsonx AI | Development |
| mistral_ai | Mistral AI | Development |
| openai | OpenAI | Development |
| perplexity | Perplexity | Development |
| x_ai | xAI | Development |
i suggest aws.bedrock_agentcore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems like this is more about the model provider though, as opposed to the framework provider. i think anything except the actual model provider would be misleading here.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this field conform to the well-known values specified in semconv for this field?
specifically:
gen_ai.operation.namehas the following list of
well-known values. If one of them applies, then the respective value
MUST be used; otherwise, a custom value MAY be used.
Value Description Stability chat Chat completion operation such as OpenAI Chat API Development create_agent Create GenAI agent Development embeddings Embeddings operation such as OpenAI Create embeddings API Development execute_tool Execute a tool Development generate_content Multimodal content generation operation such as Gemini Generate Content Development invoke_agent Invoke GenAI agent Development text_completion Text completions operation such as OpenAI Completions API (Legacy) Development
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it would be preferable to alias these fields so they are searchable both from the AWS documented naming and the gen_ai naming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think, it will be good to mention the steps needed to fetch the log_group_arn, needed for configuring this dataset?
As it is the same steps for all the log-based datasets, maybe a common section (may be under
What do I need to use this integration?) should suffice.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a small section to explain how to get the log group arn 👍