From aae103c04209feb7f7ee0a006b433aca77f0ee38 Mon Sep 17 00:00:00 2001 From: mrproliu <741550557@qq.com> Date: Mon, 25 Dec 2023 21:14:40 +0800 Subject: [PATCH] Add active config into the access log module --- configs/rover_configs.yaml | 2 ++ pkg/accesslog/common/config.go | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configs/rover_configs.yaml b/configs/rover_configs.yaml index 1b877df6..05859b0f 100644 --- a/configs/rover_configs.yaml +++ b/configs/rover_configs.yaml @@ -154,6 +154,8 @@ profiling: silence_duration: ${ROVER_PROFILING_CONTINUOUS_TRIGGER_SILENCE_DURATION:20m} access_log: + # Is active the access log monitoring + active: ${ROVER_ACCESS_LOG_ACTIVE:false} flush: # The max count of access log when flush to the backend max_count: ${ROVER_ACCESS_LOG_FLUSH_MAX_COUNT:2000} diff --git a/pkg/accesslog/common/config.go b/pkg/accesslog/common/config.go index 3b25dd80..de1bcee1 100644 --- a/pkg/accesslog/common/config.go +++ b/pkg/accesslog/common/config.go @@ -22,6 +22,7 @@ import "github.com/apache/skywalking-rover/pkg/module" type Config struct { module.Config + Active bool `mapstructure:"active"` Flush FlushConfig `mapstructure:"flush"` ProtocolAnalyze ProtocolAnalyzeConfig `mapstructure:"protocol_analyze"` } @@ -38,5 +39,5 @@ type ProtocolAnalyzeConfig struct { } func (c *Config) IsActive() bool { - return true + return c.Active }