storagenode: add new metric satellite.request (#3610)
* storagenode: add new metric satellite.request * storagenode: metrics fixed * switch from Counter to Meter
This commit is contained in:
parent
e9c3194c82
commit
da39c71d35
@ -61,3 +61,5 @@ storj.io/storj/satellite/repair/checker."remote_segments_lost" IntVal
|
|||||||
storj.io/storj/satellite/repair/checker."remote_segments_needing_repair" IntVal
|
storj.io/storj/satellite/repair/checker."remote_segments_needing_repair" IntVal
|
||||||
storj.io/storj/satellite/satellitedb."audit_reputation_alpha" FloatVal
|
storj.io/storj/satellite/satellitedb."audit_reputation_alpha" FloatVal
|
||||||
storj.io/storj/satellite/satellitedb."audit_reputation_beta" FloatVal
|
storj.io/storj/satellite/satellitedb."audit_reputation_beta" FloatVal
|
||||||
|
storj.io/storj/storagenode/contact."satellite_contact_request" Meter
|
||||||
|
storj.io/storj/storagenode/gracefulexit."satellite_gracefulexit_request" Meter
|
||||||
|
@ -77,6 +77,9 @@ func (chore *Chore) Run(ctx context.Context) (err error) {
|
|||||||
interval := initialBackOff
|
interval := initialBackOff
|
||||||
attempts := 0
|
attempts := 0
|
||||||
for {
|
for {
|
||||||
|
|
||||||
|
mon.Meter("satellite_contact_request").Mark(1) //locked
|
||||||
|
|
||||||
err := chore.pingSatellite(ctx, satellite)
|
err := chore.pingSatellite(ctx, satellite)
|
||||||
attempts++
|
attempts++
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
@ -53,6 +53,7 @@ func (chore *Chore) Run(ctx context.Context) (err error) {
|
|||||||
|
|
||||||
err = chore.Loop.Run(ctx, func(ctx context.Context) (err error) {
|
err = chore.Loop.Run(ctx, func(ctx context.Context) (err error) {
|
||||||
defer mon.Task()(&ctx)(&err)
|
defer mon.Task()(&ctx)(&err)
|
||||||
|
|
||||||
chore.log.Debug("checking pending exits")
|
chore.log.Debug("checking pending exits")
|
||||||
|
|
||||||
satellites, err := chore.satelliteDB.ListGracefulExits(ctx)
|
satellites, err := chore.satelliteDB.ListGracefulExits(ctx)
|
||||||
@ -67,6 +68,7 @@ func (chore *Chore) Run(ctx context.Context) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, satellite := range satellites {
|
for _, satellite := range satellites {
|
||||||
|
mon.Meter("satellite_gracefulexit_request").Mark(1) //locked
|
||||||
if satellite.FinishedAt != nil {
|
if satellite.FinishedAt != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user