Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions opentelemetry/ecs-ec2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
### 0.0.12 / 2024-05-16
- Added validation using operator route to default otel config for ecs-ec2 config

### 0.0.11 / 2024-04-05
- Remove deprecated PrivateKey Param from ecs-ec2 otel deployment

Expand Down
29 changes: 25 additions & 4 deletions opentelemetry/ecs-ec2/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,24 +120,35 @@ Mappings:
include_file_path: true
# add log.file.path to resource attributes
operators:
- type: router
id: docker_log_json_parser
routes:
- output: json_parser
expr: 'body matches "^\\{\"log\".*\\}xxx"'
default: move_log_file_path

- type: json_parser
parse_from: body
parse_to: body
output: recombine
timestamp:
parse_from: body.time
layout: '%Y-%m-%dT%H:%M:%S.%fZ'
default: move_log_file_path

# handle logs split by docker
- type: recombine
id: recombine
output: move_log_file_path
combine_field: body.log
source_identifier: attributes["log.file.path"]
is_last_entry: body.log endsWith "\n"
force_flush_period: 10s
on_error: drop
on_error: send
combine_with: ""

- type: move
id: move_log_file_path
from: attributes["log.file.path"]
to: resource["log.file.path"]

Expand Down Expand Up @@ -261,28 +272,38 @@ Mappings:
include_file_path: true
# add log.file.path to resource attributes
operators:
- type: router
id: docker_log_json_parser
routes:
- output: json_parser
expr: 'body matches "^\\{\"log\".*\\}xxx"'
default: move_log_file_path

- type: json_parser
parse_from: body
parse_to: body
output: recombine
timestamp:
parse_from: body.time
layout: '%Y-%m-%dT%H:%M:%S.%fZ'
default: move_log_file_path

# handle logs split by docker
- type: recombine
id: recombine
output: move_log_file_path
combine_field: body.log
source_identifier: attributes["log.file.path"]
is_last_entry: body.log endsWith "\n"
force_flush_period: 10s
on_error: drop
on_error: send
combine_with: ""

- type: move
id: move_log_file_path
from: attributes["log.file.path"]
to: resource["log.file.path"]

# add metrics

awsecscontainermetricsd:

processors:
Expand Down