Skip to content

Commit

Permalink
Add active config into the access log module
Browse files Browse the repository at this point in the history
  • Loading branch information
mrproliu committed Dec 25, 2023
1 parent 1dcf69a commit aae103c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions configs/rover_configs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
3 changes: 2 additions & 1 deletion pkg/accesslog/common/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand All @@ -38,5 +39,5 @@ type ProtocolAnalyzeConfig struct {
}

func (c *Config) IsActive() bool {
return true
return c.Active
}

0 comments on commit aae103c

Please sign in to comment.