-
Notifications
You must be signed in to change notification settings - Fork 110
swarm/metrics: Send the accounting registry to InfluxDB #1107
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except one small point noted
swarm/metrics/flags.go
Outdated
@@ -94,5 +100,12 @@ func Setup(ctx *cli.Context) { | |||
"host": hosttag, | |||
}) | |||
} | |||
|
|||
if enableAccountingExport { | |||
log.Info("Enabling accounting metrics export to InfluxDB") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this block actually sends the data to influxdb, so the log line should say something more like "exporting accounting metrics to influxdb" rather than "enabling" them. it could also be switched to log.Trace
. I don't see this necessary in Info
level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have strong feelings about the level of this, but it is 1 line, so sometimes it is helpful to see it, even if you are running in INFO mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 @JerzyLa please just change the text of the log-line
metrics/registry.go
Outdated
EphemeralRegistry = NewRegistry() | ||
DefaultRegistry = NewRegistry() | ||
EphemeralRegistry = NewRegistry() | ||
AccountingRegistry = NewRegistry() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment next to this one. Default
and Ephemeral
are used in geth
, so we should be explicit that this registry is used within Swarm I think.
test fail on travis https://travis-ci.org/ethersphere/go-ethereum/jobs/479141697#L825 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@JerzyLa would you submit to upstream repo please? |
closed by ethereum/go-ethereum#18470 |
closes #1037
I'm still beginner contributor, please make solid review to help me make better.