From 7a0ba6b0f370299ea57fa63d9efb2b6a81303888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=E1=BB=97=20Tr=E1=BB=8Dng=20H=E1=BA=A3i?= <41283691+hainenber@users.noreply.github.com> Date: Fri, 19 Apr 2024 20:33:17 +0700 Subject: [PATCH] gitignore the default `data-alloy` storage dir (#571) Signed-off-by: hainenber --- .dockerignore | 2 +- internal/static/metrics/agent.go | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.dockerignore b/.dockerignore index 480b8eda45..6b1a85acb8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,6 @@ build/ data/ -data-agent/ +data-alloy/ dist/ internal/web/ui/node_modules/ internal/web/ui/build/ diff --git a/internal/static/metrics/agent.go b/internal/static/metrics/agent.go index cb7f610842..7313674277 100644 --- a/internal/static/metrics/agent.go +++ b/internal/static/metrics/agent.go @@ -19,12 +19,14 @@ import ( var DefaultConfig = Config{ Global: instance.DefaultGlobalConfig, InstanceRestartBackoff: 5 * time.Second, - WALDir: "data-agent/", - WALCleanupAge: 12 * time.Hour, - WALCleanupPeriod: 30 * time.Minute, - ServiceConfig: cluster.DefaultConfig, - ServiceClientConfig: client.DefaultConfig, - InstanceMode: instance.DefaultMode, + // The following legacy WALDir path is intentionally kept for config conversion from static to Alloy. + // Consult Alloy maintainers for changes. + WALDir: "data-agent/", + WALCleanupAge: 12 * time.Hour, + WALCleanupPeriod: 30 * time.Minute, + ServiceConfig: cluster.DefaultConfig, + ServiceClientConfig: client.DefaultConfig, + InstanceMode: instance.DefaultMode, } // Config defines the configuration for the entire set of Prometheus client