Skip to content

Commit 061f31f

Browse files
committed
fix: Apply suggestions from code review
1 parent 134d6b6 commit 061f31f

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

plugins/outputs/redistimeseries/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ to use them.
4242
# timeout = "10s"
4343

4444
## Send an expire command to redis following the metric
45-
## Effectively causing redis to forget old values after a specific duration
46-
## Omit this field to never expire values
45+
## If set, Redis will drop the metric after the specified duration
4746
# expire = "300s"
4847

4948
## Enable attempt to convert string fields to numeric values

plugins/outputs/redistimeseries/redistimeseries.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ func (r *RedisTimeSeries) Write(metrics []telegraf.Metric) error {
110110
if r.Expire != nil {
111111
pipe.Expire(ctx, key, time.Duration(*r.Expire))
112112
}
113-
_, err := pipe.Exec(ctx)
114-
if err != nil {
113+
if _, err := pipe.Exec(ctx); err != nil {
115114
return fmt.Errorf("adding sample %q failed: %w", key, err)
116115
}
117116
}

plugins/outputs/redistimeseries/sample.conf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
# timeout = "10s"
1313

1414
## Send an expire command to redis following the metric
15-
## Effectively causing redis to forget old values after a specific duration
16-
## Omit this field to never expire values
15+
## If set, Redis will drop the metric after the specified duration
1716
# expire = "300s"
1817

1918
## Enable attempt to convert string fields to numeric values

0 commit comments

Comments
 (0)