Skip to content

Commit

Permalink
[receiver/redis] Add missing description fields to keyspace metrics (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryax authored Dec 22, 2021
1 parent 95ae537 commit 7aad2e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- `mysqlreceiver`: Add Integration test (#6916)
- `datadogexporter`: Add compatibility with ECS Fargate semantic conventions (#6670)
- `k8s_observer`: discover k8s.node endpoints (#6820)
- `redisreceiver`: Add missing description fields to keyspace metrics (#6940)

## 🛑 Breaking changes 🛑

Expand Down
3 changes: 3 additions & 0 deletions receiver/redisreceiver/pdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func initKeyspaceKeysMetric(k *keyspace, t *timeBundle, dest pdata.Metric) {
name: "redis.db.keys",
labels: map[string]pdata.AttributeValue{"db": pdata.NewAttributeValueString(k.db)},
pdType: pdata.MetricDataTypeGauge,
desc: "Number of keyspace keys",
}
initIntMetric(m, int64(k.keys), t, dest)
}
Expand All @@ -41,6 +42,7 @@ func initKeyspaceExpiresMetric(k *keyspace, t *timeBundle, dest pdata.Metric) {
name: "redis.db.expires",
labels: map[string]pdata.AttributeValue{"db": pdata.NewAttributeValueString(k.db)},
pdType: pdata.MetricDataTypeGauge,
desc: "Number of keyspace keys with an expiration",
}
initIntMetric(m, int64(k.expires), t, dest)
}
Expand All @@ -51,6 +53,7 @@ func initKeyspaceTTLMetric(k *keyspace, t *timeBundle, dest pdata.Metric) {
units: "ms",
labels: map[string]pdata.AttributeValue{"db": pdata.NewAttributeValueString(k.db)},
pdType: pdata.MetricDataTypeGauge,
desc: "Average keyspace keys TTL",
}
initIntMetric(m, int64(k.avgTTL), t, dest)
}
Expand Down

0 comments on commit 7aad2e7

Please sign in to comment.