Skip to content

Commit d0965d8

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

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
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
}

0 commit comments

Comments
 (0)