Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
Persisting failed transactions on disk when in-mem buffer is full (Da…
Browse files Browse the repository at this point in the history
…taDog#6921)

persisting failed transactions on disk when in-mem buffer is full
  • Loading branch information
ogaca-dd authored and sergei-deliveroo committed Mar 24, 2021
1 parent c568988 commit 77f3687
Show file tree
Hide file tree
Showing 17 changed files with 2,812 additions and 63 deletions.
8 changes: 8 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"net"
"net/url"
"os"
"path"
"path/filepath"
"regexp"
"strings"
Expand Down Expand Up @@ -321,6 +322,13 @@ func InitConfig(config Config) {
config.BindEnvAndSetDefault("forwarder_recovery_interval", DefaultForwarderRecoveryInterval)
config.BindEnvAndSetDefault("forwarder_recovery_reset", false)

// Forwarder storage on disk
defaultForwarderStoragePath := path.Join(config.GetString("run_path"), "transactions_to_retry")
config.BindEnvAndSetDefault("forwarder_storage_path", defaultForwarderStoragePath)
config.BindEnvAndSetDefault("forwarder_outdated_file_in_days", 10)
config.BindEnvAndSetDefault("forwarder_flush_to_disk_mem_ratio", 0.5)
config.BindEnvAndSetDefault("forwarder_storage_max_size_in_bytes", 0) // 0 means disabled. This is a BETA feature.

// Dogstatsd
config.BindEnvAndSetDefault("use_dogstatsd", true)
config.BindEnvAndSetDefault("dogstatsd_port", 8125) // Notice: 0 means UDP port closed
Expand Down
Loading

0 comments on commit 77f3687

Please sign in to comment.