Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
8218221f
Unverified
Commit
8218221f
authored
May 04, 2023
by
mergify[bot]
Committed by
GitHub
May 04, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into fix/exported/metrics
parents
a67902ca
7fd1e5d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
metrics.go
op-proposer/metrics/metrics.go
+6
-6
No files found.
op-proposer/metrics/metrics.go
View file @
8218221f
...
...
@@ -37,8 +37,8 @@ type Metrics struct {
opmetrics
.
RefMetrics
txmetrics
.
TxMetrics
I
nfo
prometheus
.
GaugeVec
U
p
prometheus
.
Gauge
i
nfo
prometheus
.
GaugeVec
u
p
prometheus
.
Gauge
}
var
_
Metricer
=
(
*
Metrics
)(
nil
)
...
...
@@ -60,14 +60,14 @@ func NewMetrics(procName string) *Metrics {
RefMetrics
:
opmetrics
.
MakeRefMetrics
(
ns
,
factory
),
TxMetrics
:
txmetrics
.
MakeTxMetrics
(
ns
,
factory
),
I
nfo
:
*
factory
.
NewGaugeVec
(
prometheus
.
GaugeOpts
{
i
nfo
:
*
factory
.
NewGaugeVec
(
prometheus
.
GaugeOpts
{
Namespace
:
ns
,
Name
:
"info"
,
Help
:
"Pseudo-metric tracking version and config info"
,
},
[]
string
{
"version"
,
}),
U
p
:
factory
.
NewGauge
(
prometheus
.
GaugeOpts
{
u
p
:
factory
.
NewGauge
(
prometheus
.
GaugeOpts
{
Namespace
:
ns
,
Name
:
"up"
,
Help
:
"1 if the op-proposer has finished starting up"
,
...
...
@@ -87,13 +87,13 @@ func (m *Metrics) StartBalanceMetrics(ctx context.Context,
// RecordInfo sets a pseudo-metric that contains versioning and
// config info for the op-proposer.
func
(
m
*
Metrics
)
RecordInfo
(
version
string
)
{
m
.
I
nfo
.
WithLabelValues
(
version
)
.
Set
(
1
)
m
.
i
nfo
.
WithLabelValues
(
version
)
.
Set
(
1
)
}
// RecordUp sets the up metric to 1.
func
(
m
*
Metrics
)
RecordUp
()
{
prometheus
.
MustRegister
()
m
.
U
p
.
Set
(
1
)
m
.
u
p
.
Set
(
1
)
}
const
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment