Skip to content

Commit

Permalink
Update file experiments to the use of logrotate FS
Browse files Browse the repository at this point in the history
This commit updates the file_to_blackhole experiments to rely on the lading
logrotate FS generator, allowing us to assert on whether the log Agent loses
bytes in the course of its operation. I've added a new check asserting that no
bytes are lost, although I do not expect this to pass on higher latency intake
experiments yet.

REF #30744
REF DataDog/lading#1090

Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
  • Loading branch information
blt committed Nov 5, 2024
1 parent af8e4b2 commit e3f1bda
Show file tree
Hide file tree
Showing 15 changed files with 65 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
logs:
- type: file
path: "/tmp/smp/*.log"
path: "/smp-shared/*.log"
service: "my-service"
source: "my-client-app"
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ checks:
series: total_rss_bytes
# The machine has 12GiB free.
upper_bound: 1.2GiB

- name: lost_bytes
description: "Allowable bytes not polled by log Agent"
bounds:
series: lost_bytes
upper_bound: 0KB
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
generator:
- file_gen:
logrotate:
logrotate_fs:
seed: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53,
59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131]
root: "/tmp/smp"
concurrent_logs: 8
maximum_bytes_per_log: "500MiB"
maximum_bytes_per_log: 500MB
total_rotations: 5
max_depth: 1 # flat, all logs are /tmp/smp/12345.log
max_depth: 0
variant: "ascii"
bytes_per_second: "10MiB"
maximum_prebuild_cache_size_bytes: "300MiB"
bytes_per_second: 10MB
maximum_prebuild_cache_size_bytes: 300MB
mount_point: /smp-shared

blackhole:
- http:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
logs:
- type: file
path: "/tmp/smp/*.log"
path: "/smp-shared/*.log"
service: "my-service"
source: "my-client-app"
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ checks:
series: total_rss_bytes
# The machine has 12GiB free.
upper_bound: 1.2GiB

- name: lost_bytes
description: "Allowable bytes not polled by log Agent"
bounds:
series: lost_bytes
upper_bound: 0KB
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
generator:
- file_gen:
logrotate:
logrotate_fs:
seed: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53,
59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131]
root: "/tmp/smp"
concurrent_logs: 8
maximum_bytes_per_log: "500MiB"
maximum_bytes_per_log: 500MB
total_rotations: 5
max_depth: 1 # flat, all logs are /tmp/smp/12345.log
max_depth: 0
variant: "ascii"
bytes_per_second: "10MiB"
maximum_prebuild_cache_size_bytes: "300MiB"
bytes_per_second: 10MB
maximum_prebuild_cache_size_bytes: 300MB
mount_point: /smp-shared

blackhole:
- http:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
logs:
- type: file
path: "/tmp/smp/*.log"
path: "/smp-shared/*.log"
service: "my-service"
source: "my-client-app"
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ checks:
series: total_rss_bytes
# The machine has 12GiB free.
upper_bound: 1.2GiB

- name: lost_bytes
description: "Allowable bytes not polled by log Agent"
bounds:
series: lost_bytes
upper_bound: 0KB
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
generator:
- file_gen:
logrotate:
logrotate_fs:
seed: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53,
59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131]
root: "/tmp/smp"
concurrent_logs: 8
maximum_bytes_per_log: "500MiB"
maximum_bytes_per_log: 500MB
total_rotations: 5
max_depth: 1 # flat, all logs are /tmp/smp/12345.log
max_depth: 0
variant: "ascii"
bytes_per_second: "10MiB"
maximum_prebuild_cache_size_bytes: "300MiB"
bytes_per_second: 10MB
maximum_prebuild_cache_size_bytes: 300MB
mount_point: /smp-shared

blackhole:
- http:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
logs:
- type: file
path: "/tmp/smp/*.log"
path: "/smp-shared/*.log"
service: "my-service"
source: "my-client-app"
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ checks:
series: total_rss_bytes
# The machine has 12GiB free.
upper_bound: 1.2GiB

- name: lost_bytes
description: "Allowable bytes not polled by log Agent"
bounds:
series: lost_bytes
upper_bound: 0KB
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
generator:
- file_gen:
logrotate:
logrotate_fs:
seed: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53,
59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131]
root: "/tmp/smp"
concurrent_logs: 8
maximum_bytes_per_log: "500MiB"
maximum_bytes_per_log: 500MB
total_rotations: 5
max_depth: 1 # flat, all logs are /tmp/smp/12345.log
max_depth: 0
variant: "ascii"
bytes_per_second: "10MiB"
maximum_prebuild_cache_size_bytes: "300MiB"
bytes_per_second: 10MB
maximum_prebuild_cache_size_bytes: 300MB
mount_point: /smp-shared

blackhole:
- http:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
logs:
- type: file
path: "/tmp/smp/*.log"
path: "/smp-shared/*.log"
service: "my-service"
source: "my-client-app"
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ checks:
series: total_rss_bytes
# The machine has 12GiB free.
upper_bound: 1.2GiB

- name: lost_bytes
description: "Allowable bytes not polled by log Agent"
bounds:
series: lost_bytes
upper_bound: 0KB
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
generator:
- file_gen:
logrotate:
logrotate_fs:
seed: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53,
59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131]
root: "/tmp/smp"
concurrent_logs: 8
maximum_bytes_per_log: "500MiB"
maximum_bytes_per_log: 500MB
total_rotations: 5
max_depth: 1 # flat, all logs are /tmp/smp/12345.log
max_depth: 0
variant: "ascii"
bytes_per_second: "10MiB"
maximum_prebuild_cache_size_bytes: "300MiB"
bytes_per_second: 10MB
maximum_prebuild_cache_size_bytes: 300MB
mount_point: /smp-shared

blackhole:
- http:
Expand Down

0 comments on commit e3f1bda

Please sign in to comment.