Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

swarm/metrics: Send the accounting registry to InfluxDB #1107

Closed
wants to merge 3 commits into from

Conversation

JerzyLa
Copy link

@JerzyLa JerzyLa commented Jan 13, 2019

closes #1037

I'm still beginner contributor, please make solid review to help me make better.

@JerzyLa JerzyLa changed the title swarm/metrics: Send the accounting registry to InfluxDB swarm/metrics: Send the accounting registry to InfluxDB (https://github.com/ethersphere/go-ethereum/issues/1037) Jan 13, 2019
@JerzyLa JerzyLa changed the title swarm/metrics: Send the accounting registry to InfluxDB (https://github.com/ethersphere/go-ethereum/issues/1037) swarm/metrics: Send the accounting registry to InfluxDB Jan 13, 2019
@zelig zelig requested review from acud and nonsense and removed request for fjl and zsfelfoldi January 14, 2019 03:00
Copy link
Member

@acud acud left a 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

@@ -94,5 +100,12 @@ func Setup(ctx *cli.Context) {
"host": hosttag,
})
}

if enableAccountingExport {
log.Info("Enabling accounting metrics export to InfluxDB")
Copy link
Member

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

Copy link
Contributor

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.

Copy link
Member

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

EphemeralRegistry = NewRegistry()
DefaultRegistry = NewRegistry()
EphemeralRegistry = NewRegistry()
AccountingRegistry = NewRegistry()
Copy link
Contributor

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.

@zelig
Copy link
Member

zelig commented Jan 15, 2019

Copy link
Member

@acud acud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zelig
Copy link
Member

zelig commented Jan 17, 2019

@JerzyLa would you submit to upstream repo please?

@JerzyLa
Copy link
Author

JerzyLa commented Jan 17, 2019

closed by ethereum/go-ethereum#18470

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Send the accounting registry to InfluxDB as well (optionally)
4 participants