Skip to content

Commit fa3e2d4

Browse files
authored
fix: exporter timeout equal to default prometheus timeout (#41)
Co-authored-by: Henri Devigne <henri@devigne.digital>
1 parent f7c96e9 commit fa3e2d4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The exporter can be configured with command line arguments, environment variable
6868
| --eventstore-user | EVENTSTORE_USER | (empty) | EventStoreDB user (if not specified, basic auth is not used) |
6969
| --eventstore-password | EVENTSTORE_PASSWORD | (empty) | EventStoreDB password (if not specified, basic auth is not used) |
7070
| --port | PORT | 9448 | Port to expose scrape endpoint on |
71-
| --timeout | TIMEOUT | 10s | Timeout for the scrape operation |
71+
| --timeout | TIMEOUT | 8s | Timeout for the scrape operation |
7272
| --verbose | VERBOSE | false | Enable verbose logging |
7373
| --insecure-skip-verify | INSECURE_SKIP_VERIFY | false | Skip TLS certificate verification for EventStore HTTP client |
7474
| --enable-parked-messages-stats | ENABLE_PARKED_MESSAGES_STATS | false | Enable parked messages stats scraping. |

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func Load(args []string, suppressOutput bool) (*Config, error) {
3333
fs.StringVar(&config.EventStoreUser, "eventstore-user", "", "EventStore User")
3434
fs.StringVar(&config.EventStorePassword, "eventstore-password", "", "EventStore Password")
3535
fs.UintVar(&config.Port, "port", 9448, "Port to expose scraping endpoint on")
36-
fs.DurationVar(&config.Timeout, "timeout", time.Second*10, "Timeout for the scrape operation")
36+
fs.DurationVar(&config.Timeout, "timeout", time.Second*8, "Timeout for the scrape operation")
3737
fs.BoolVar(&config.Verbose, "verbose", false, "Enable verbose logging")
3838
fs.BoolVar(&config.InsecureSkipVerify, "insecure-skip-verify", false, "Skip TLS certificatte verification for EventStore HTTP client")
3939
fs.BoolVar(&config.EnableParkedMessagesStats, "enable-parked-messages-stats", false, "Enable parked messages stats scraping")

internal/config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestLoadConfig(t *testing.T) {
1818
name: "no parameters specified reults in defaults",
1919
args: []string{},
2020
expectedConfig: Config{
21-
Timeout: time.Duration(10 * time.Second),
21+
Timeout: time.Duration(8 * time.Second),
2222
Port: 9448,
2323
Verbose: false,
2424
InsecureSkipVerify: false,

0 commit comments

Comments
 (0)