mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/protoparser: metrics renaming: vm_protoparser_<type>_*
-> vm_protoparser_*{type="<type>"}
This should improve composability of these metrics in PromQL queries
This commit is contained in:
parent
0eed71c7f4
commit
6a1aab88fd
6 changed files with 20 additions and 20 deletions
|
@ -100,9 +100,9 @@ func (ctx *streamContext) reset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
readCalls = metrics.NewCounter(`vm_protoparser_graphite_read_calls_total`)
|
readCalls = metrics.NewCounter(`vm_protoparser_read_calls_total{type="graphite"}`)
|
||||||
readErrors = metrics.NewCounter(`vm_protoparser_graphite_read_errors_total`)
|
readErrors = metrics.NewCounter(`vm_protoparser_read_errors_total{type="graphite"}`)
|
||||||
rowsRead = metrics.NewCounter(`vm_protoparser_graphite_rows_read_total`)
|
rowsRead = metrics.NewCounter(`vm_protoparser_rows_read_total{type="graphite"}`)
|
||||||
)
|
)
|
||||||
|
|
||||||
func getStreamContext() *streamContext {
|
func getStreamContext() *streamContext {
|
||||||
|
|
|
@ -97,9 +97,9 @@ func (ctx *streamContext) Read(r io.Reader, tsMultiplier int64) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
readCalls = metrics.NewCounter(`vm_protoparser_influx_read_calls_total`)
|
readCalls = metrics.NewCounter(`vm_protoparser_read_calls_total{type="influx"}`)
|
||||||
readErrors = metrics.NewCounter(`vm_protoparser_influx_read_errors_total`)
|
readErrors = metrics.NewCounter(`vm_protoparser_read_errors_total{type="influx"}`)
|
||||||
rowsRead = metrics.NewCounter(`vm_protoparser_influx_rows_read_total`)
|
rowsRead = metrics.NewCounter(`vm_protoparser_rows_read_total{type="influx"}`)
|
||||||
)
|
)
|
||||||
|
|
||||||
type streamContext struct {
|
type streamContext struct {
|
||||||
|
|
|
@ -98,9 +98,9 @@ func (ctx *streamContext) reset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
readCalls = metrics.NewCounter(`vm_protoparser_opentsdb_read_calls_total`)
|
readCalls = metrics.NewCounter(`vm_protoparser_read_calls_total{type="opentsdb"}`)
|
||||||
readErrors = metrics.NewCounter(`vm_protoparser_opentsdb_read_errors_total`)
|
readErrors = metrics.NewCounter(`vm_protoparser_read_errors_total{type="opentsdb"}`)
|
||||||
rowsRead = metrics.NewCounter(`vm_protoparser_opentsdb_rows_read_total`)
|
rowsRead = metrics.NewCounter(`vm_protoparser_rows_read_total{type="opentsdb"}`)
|
||||||
)
|
)
|
||||||
|
|
||||||
func getStreamContext() *streamContext {
|
func getStreamContext() *streamContext {
|
||||||
|
|
|
@ -96,10 +96,10 @@ func (ctx *streamContext) reset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
readCalls = metrics.NewCounter(`vm_protoparser_opentsdbhttp_read_calls_total`)
|
readCalls = metrics.NewCounter(`vm_protoparser_read_calls_total{type="opentsdbhttp"}`)
|
||||||
readErrors = metrics.NewCounter(`vm_protoparser_opentsdbhttp_read_errors_total`)
|
readErrors = metrics.NewCounter(`vm_protoparser_read_errors_total{type="opentsdbhttp"}`)
|
||||||
rowsRead = metrics.NewCounter(`vm_protoparser_opentsdbhttp_rows_read_total`)
|
rowsRead = metrics.NewCounter(`vm_protoparser_rows_read_total{type="opentsdbhttp"}`)
|
||||||
unmarshalErrors = metrics.NewCounter(`vm_protoparser_opentsdbhttp_unmarshal_errors_total`)
|
unmarshalErrors = metrics.NewCounter(`vm_protoparser_unmarshal_errors_total{type="opentsdbhttp"}`)
|
||||||
)
|
)
|
||||||
|
|
||||||
func getStreamContext() *streamContext {
|
func getStreamContext() *streamContext {
|
||||||
|
|
|
@ -62,10 +62,10 @@ func (ctx *pushCtx) Read(r *http.Request) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
readCalls = metrics.NewCounter(`vm_protoparser_promremotewrite_read_calls_total`)
|
readCalls = metrics.NewCounter(`vm_protoparser_read_calls_total{type="promremotewrite"}`)
|
||||||
readErrors = metrics.NewCounter(`vm_protoparser_promremotewrite_read_errors_total`)
|
readErrors = metrics.NewCounter(`vm_protoparser_read_errors_total{type="promremotewrite"}`)
|
||||||
rowsRead = metrics.NewCounter(`vm_protoparser_promremotewrite_rows_read_total`)
|
rowsRead = metrics.NewCounter(`vm_protoparser_rows_read_total{type="promremotewrite"}`)
|
||||||
unmarshalErrors = metrics.NewCounter(`vm_protoparser_promremotewrite_unmarshal_errors`)
|
unmarshalErrors = metrics.NewCounter(`vm_protoparser_unmarshal_errors{type="promremotewrite"}`)
|
||||||
)
|
)
|
||||||
|
|
||||||
func getPushCtx() *pushCtx {
|
func getPushCtx() *pushCtx {
|
||||||
|
|
|
@ -60,9 +60,9 @@ func (ctx *streamContext) Read(r io.Reader) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
readCalls = metrics.NewCounter(`vm_protoparser_vmimport_read_calls_total`)
|
readCalls = metrics.NewCounter(`vm_protoparser_read_calls_total{type="vmimport"}`)
|
||||||
readErrors = metrics.NewCounter(`vm_protoparser_vmimport_read_errors_total`)
|
readErrors = metrics.NewCounter(`vm_protoparser_read_errors_total{type="vmimport"}`)
|
||||||
rowsRead = metrics.NewCounter(`vm_protoparser_vmimport_rows_read_total`)
|
rowsRead = metrics.NewCounter(`vm_protoparser_rows_read_total{type="vmimport"}`)
|
||||||
)
|
)
|
||||||
|
|
||||||
type streamContext struct {
|
type streamContext struct {
|
||||||
|
|
Loading…
Reference in a new issue