Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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.9 / 2024-03-15
- [cds-1099] add recombine operator to default configuration for opentelemetry ecs-ec2 integration
- reverted previous fix for ECS EC2 default Otel configuration filelog receiver include statement to match the new mount scope

### 0.0.8 / 2024-03-13
- Fixed ECS EC2 default Otel configuration filelog receiver include statement to match the new mount scope
Expand Down
38 changes: 36 additions & 2 deletions opentelemetry/ecs-ec2/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,27 @@ Mappings:
filelog:
start_at: end
include:
- /hostfs/containers/*/*.log
- /hostfs/var/lib/docker/containers/*/*.log
include_file_path: true
# add log.file.path to resource attributes
operators:
- type: json_parser
parse_from: body
parse_to: body
timestamp:
parse_from: body.time
layout: '%Y-%m-%dT%H:%M:%S.%fZ'

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

- type: move
from: attributes["log.file.path"]
to: resource["log.file.path"]
Expand Down Expand Up @@ -245,10 +262,27 @@ Mappings:
filelog:
start_at: end
include:
- /hostfs/containers/*/*.log
- /hostfs/var/lib/docker/containers/*/*.log
include_file_path: true
# add log.file.path to resource attributes
operators:
- type: json_parser
parse_from: body
parse_to: body
timestamp:
parse_from: body.time
layout: '%Y-%m-%dT%H:%M:%S.%fZ'

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

- type: move
from: attributes["log.file.path"]
to: resource["log.file.path"]
Expand Down