-
Notifications
You must be signed in to change notification settings - Fork 38
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
Adds log constraints to docker containers not instantiated by the go client #1956
Conversation
@@ -130,10 +130,12 @@ jobs: | |||
-v /proc/:/host/proc/:ro \ | |||
-v /opt/datadog-agent/run:/opt/datadog-agent/run:rw \ | |||
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \ | |||
--log-opt max-file=3 --log-opt max-size=10m \ |
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.
what happens when we reach the limit? do we truncate the file?
why is it set to only 10 MB?
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's just a rotating log file - will delete the oldest - so the total logs available will be the last 3*10MB (30mb). It's just what seemed useful originally as a set-point based on how we were using. we can definitely swap the params to different values though... @zkokelj
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.
Added minor comments.
Other than that looks good to me
@@ -102,6 +102,7 @@ jobs: | |||
-v /proc/:/host/proc/:ro \ | |||
-v /opt/datadog-agent/run:/opt/datadog-agent/run:rw \ | |||
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \ | |||
--log-opt max-file=3 --log-opt max-size=10m \ |
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's not needed here. We have local logs only for gateway and not for gateway databse.
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.
Yes, but i think it's still okay to leave here. The reason is that the agent itself is emitting logs - although at a much lower rate. But if it was up a super long time, then it could potentially fill up the container fs...
2024-06-10 18:12:27 UTC | TRACE | INFO | (pkg/trace/info/stats.go:91 in LogAndResetStats) | No data received
2024-06-10 18:12:52 UTC | CORE | INFO | (pkg/serializer/serializer.go:454 in SendProcessesMetadata) | Sent processes metadata payload, size: 1415 bytes.
2024-06-10 18:13:27 UTC | TRACE | INFO | (pkg/trace/info/stats.go:91 in LogAndResetStats) | No data received
2024-06-10 18:14:22 UTC | PROCESS | INFO | (pkg/process/runner/runner.go:247 in logCheckDuration) | Finish container check #640 in 3.485494ms
2024-06-10 18:14:27 UTC | TRACE | INFO | (pkg/trace/info/stats.go:91 in LogAndResetStats) | No data received
2024-06-10 18:15:32 UTC | TRACE | INFO | (pkg/trace/info/stats.go:91 in LogAndResetStats) | No data received
2024-06-10 18:16:32 UTC | TRACE | INFO | (pkg/trace/info/stats.go:91 in LogAndResetStats) | No data received
2024-06-10 18:17:37 UTC | TRACE | INFO | (pkg/trace/info/stats.go:91 in LogAndResetStats) | No data received
2024-06-10 18:17:42 UTC | PROCESS | INFO | (pkg/process/runner/runner.go:247 in logCheckDuration) | Finish container check #660 in 3.250694ms
2024-06-10 18:17:52 UTC | CORE | INFO | (pkg/serializer/serializer.go:454 in SendProcessesMetadata) | Sent processes metadata payload, size: 1422 bytes.
2024-06-10 18:18:42 UTC | TRACE | INFO | (pkg/trace/info/stats.go:91 in LogAndResetStats) | No data received
2024-06-10 18:18:50 UTC | CORE | INFO | (pkg/serializer/serializer.go:429 in sendMetadata) | Sent metadata payload, size (raw/compressed): 1080/432 bytes.
2024-06-10 18:18:51 UTC | CORE | INFO | (pkg/serializer/serializer.go:429 in sendMetadata) | Sent metadata payload, size (raw/compressed): 34320/8352 bytes.
2024-06-10 18:18:51 UTC | CORE | INFO | (pkg/serializer/serializer.go:429 in sendMetadata) | Sent metadata payload, size (raw/compressed): 1978/492 bytes.
2024-06-10 18:18:52 UTC | CORE | INFO | (pkg/util/cloudproviders/cloudproviders.go:52 in DetectCloudProvider) | Cloud provider Azure detected
2024-06-10 18:18:52 UTC | CORE | INFO | (pkg/util/cloudproviders/cloudproviders.go:60 in DetectCloudProvider) | Detecting cloud provider account ID from Azure: "6e522d3f-f104-4fdf-bf88-76d2fe400cca"
2024-06-10 18:18:52 UTC | CORE | INFO | (pkg/serializer/serializer.go:429 in sendMetadata) | Sent metadata payload, size (raw/compressed): 1103/635 bytes.
2024-06-10 18:19:47 UTC | TRACE | INFO | (pkg/trace/info/stats.go:91 in LogAndResetStats) | No data received
2024-06-10 18:20:47 UTC | TRACE | INFO | (pkg/trace/info/stats.go:91 in LogAndResetStats) | No data received
2024-06-10 18:21:02 UTC | PROCESS | INFO | (pkg/process/runner/runner.go:247 in logCheckDuration) | Finish container check #680 in 3.526283ms
2024-06-10 18:21:52 UTC | TRACE | INFO | (pkg/trace/info/stats.go:91 in LogAndResetStats) | No data received
I think the tests were failing but it's unrelated. |
Why this change is needed
Containers for gateway are instantiated manually via docker run which isn't applying the
max-file
andmax-log
logging options to the containers.What changes were made as part of this PR
Added the logging options to the execution statements in the workflows.
PR checks pre-merging
Please indicate below by ticking the checkbox that you have read and performed the required
PR checks