Skip to content

Commit

Permalink
Add mapping for more Cassandra latency metrics (#1054)
Browse files Browse the repository at this point in the history
Add mapping for Cassandra latency metrics by keyspace and
consistency level.
  • Loading branch information
mattl-netflix authored Apr 24, 2023
1 parent c4af9d7 commit 5d14a28
Showing 1 changed file with 166 additions and 0 deletions.
166 changes: 166 additions & 0 deletions spectator-ext-jvm/src/main/resources/cassandra.conf
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,172 @@ netflix.spectator.agent.jmx {
]
},

//
// type=Keyspace
//
{
query = "org.apache.cassandra.metrics:type=Keyspace,keyspace=*,name=*Latency"
measurements = [
{
name = "cass.ks.{name}"
tags = [
{
key = "keyspace"
value = "{keyspace}"
},
{
key = "familyType"
value = "{type}"
},
{
key = "statistic"
value = "count"
},
{
key = "atlas.dstype"
value = "rate"
}
]
value = "{OneMinuteRate}"
},
{
name = "cass.ks.{name}"
tags = [
{
key = "keyspace"
value = "{keyspace}"
},
{
key = "familyType"
value = "{type}"
},
{
key = "statistic"
value = "max"
},
{
key = "atlas.dstype"
value = "gauge"
}
]
value = "{Max},1e6,:div"
},
{
name = "cass.ks.{name}"
tags = [
{
key = "keyspace"
value = "{keyspace}"
},
{
key = "familyType"
value = "{type}"
},
{
key = "statistic"
value = "totalTime"
},
{
key = "atlas.dstype"
value = "rate"
}
]
// 50th percentile is used instead of mean because prior to metrics3 the mean
// is for the life of the timer rather than for the last snapshot of the
// reservoir
value = "{50thPercentile},1e6,:div,{OneMinuteRate},:mul,{Count},{previous:Count},:if-changed"
},
{
name = "cass.ks.{name}"
tags = [
{
key = "keyspace"
value = "{keyspace}"
},
{
key = "familyType"
value = "{type}"
},
{
key = "statistic"
value = "percentile_50"
},
{
key = "atlas.dstype"
value = "gauge"
}
]
value = "{50thPercentile},1e6,:div,{Count},{previous:Count},:if-changed"
},
{
name = "cass.ks.{name}"
tags = [
{
key = "keyspace"
value = "{keyspace}"
},
{
key = "familyType"
value = "{type}"
},
{
key = "statistic"
value = "percentile_95"
},
{
key = "atlas.dstype"
value = "gauge"
}
]
value = "{95thPercentile},1e6,:div,{Count},{previous:Count},:if-changed"
},
{
name = "cass.ks.{name}"
tags = [
{
key = "keyspace"
value = "{keyspace}"
},
{
key = "familyType"
value = "{type}"
},
{
key = "statistic"
value = "percentile_99"
},
{
key = "atlas.dstype"
value = "gauge"
}
]
value = "{99thPercentile},1e6,:div,{Count},{previous:Count},:if-changed"
},
{
name = "cass.ks.{name}"
tags = [
{
key = "keyspace"
value = "{keyspace}"
},
{
key = "familyType"
value = "{type}"
},
{
key = "statistic"
value = "percentile_99.9"
},
{
key = "atlas.dstype"
value = "gauge"
}
]
value = "{999thPercentile},1e6,:div,{Count},{previous:Count},:if-changed"
}
]
},

//
// type=ColumnFamily
//
Expand Down

0 comments on commit 5d14a28

Please sign in to comment.