put metrics in own namespace
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
d927ad4673
commit
ddf0bfa01f
@ -35,7 +35,8 @@ func NewHandlerWrapper(opts ...server.Option) server.HandlerWrapper {
|
|||||||
|
|
||||||
opsCounter := prometheus.NewCounterVec(
|
opsCounter := prometheus.NewCounterVec(
|
||||||
prometheus.CounterOpts{
|
prometheus.CounterOpts{
|
||||||
Name: fmt.Sprintf("%s_request_total", defaultMetricPrefix),
|
Namespace: "micro",
|
||||||
|
Name: "request_total",
|
||||||
Help: "How many go-micro requests processed, partitioned by method and status",
|
Help: "How many go-micro requests processed, partitioned by method and status",
|
||||||
},
|
},
|
||||||
[]string{"method", "status"},
|
[]string{"method", "status"},
|
||||||
@ -43,7 +44,8 @@ func NewHandlerWrapper(opts ...server.Option) server.HandlerWrapper {
|
|||||||
|
|
||||||
timeCounterSummary := prometheus.NewSummaryVec(
|
timeCounterSummary := prometheus.NewSummaryVec(
|
||||||
prometheus.SummaryOpts{
|
prometheus.SummaryOpts{
|
||||||
Name: fmt.Sprintf("%s_upstream_latency_microseconds", defaultMetricPrefix),
|
Namespace: "micro",
|
||||||
|
Name: "upstream_latency_microseconds",
|
||||||
Help: "Service backend method request latencies in microseconds",
|
Help: "Service backend method request latencies in microseconds",
|
||||||
},
|
},
|
||||||
[]string{"method"},
|
[]string{"method"},
|
||||||
@ -51,7 +53,8 @@ func NewHandlerWrapper(opts ...server.Option) server.HandlerWrapper {
|
|||||||
|
|
||||||
timeCounterHistogram := prometheus.NewHistogramVec(
|
timeCounterHistogram := prometheus.NewHistogramVec(
|
||||||
prometheus.HistogramOpts{
|
prometheus.HistogramOpts{
|
||||||
Name: fmt.Sprintf("%s_request_duration_seconds", defaultMetricPrefix),
|
Namespace: "micro",
|
||||||
|
Name: "request_duration_seconds",
|
||||||
Help: "Service method request time in seconds",
|
Help: "Service method request time in seconds",
|
||||||
},
|
},
|
||||||
[]string{"method"},
|
[]string{"method"},
|
||||||
|
Loading…
Reference in New Issue
Block a user