-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a67493c
commit 20e5219
Showing
4 changed files
with
144 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package metrics | ||
|
||
import ( | ||
"github.com/prometheus/client_golang/prometheus" | ||
"github.com/prometheus/client_golang/prometheus/promauto" | ||
) | ||
|
||
var RpcRequestByMethod = promauto.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Name: "rpc_requests_by_method", | ||
Help: "RPC requests by method", | ||
}, | ||
[]string{"method"}, | ||
) | ||
|
||
var EpochsAvailable = promauto.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Name: "epoch_available", | ||
Help: "Epochs available", | ||
}, | ||
[]string{"epoch"}, | ||
) | ||
|
||
var StatusCode = promauto.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Name: "status_code", | ||
Help: "Status code", | ||
}, | ||
[]string{"code"}, | ||
) | ||
|
||
var MethodToCode = promauto.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Name: "method_to_code", | ||
Help: "Method to code", | ||
}, | ||
[]string{"method", "code"}, | ||
) | ||
|
||
var MethodToSuccessOrFailure = promauto.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Name: "method_to_success_or_failure", | ||
Help: "Method to success or failure", | ||
}, | ||
[]string{"method", "status"}, | ||
) | ||
|
||
var MethodToNumProxied = promauto.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Name: "method_to_num_proxied", | ||
Help: "Method to num proxied", | ||
}, | ||
[]string{"method"}, | ||
) | ||
|
||
var ResponseTimeHistogram = promauto.NewHistogramVec( | ||
prometheus.HistogramOpts{ | ||
Name: "response_time_histogram", | ||
Help: "Response time histogram", | ||
}, | ||
[]string{"method"}, | ||
) | ||
|
||
// - Version information of this binary | ||
var Version = promauto.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Name: "version", | ||
Help: "Version information of this binary", | ||
}, | ||
[]string{"started_at", "tag", "commit", "compiler", "goarch", "goos", "goamd64", "vcs", "vcs_revision", "vcs_time", "vcs_modified"}, | ||
) |
Oops, something went wrong.