Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send default tags on reporter #22

Merged
merged 2 commits into from
Jun 26, 2018
Merged

send default tags on reporter #22

merged 2 commits into from
Jun 26, 2018

Conversation

henrod
Copy link
Contributor

@henrod henrod commented Jun 26, 2018

I would like to choose new tags (or labels, on Prometheus) to send to StatsD and Prometheus. This PR adds a new field on config to get these default tags and sends them on every metric.

@henrod henrod requested a review from felipejfc June 26, 2018 16:47
Copy link
Contributor

@felipejfc felipejfc left a comment

Choose a reason for hiding this comment

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

seems good, just a small modification

@@ -137,13 +137,13 @@ func Configure(
app.messageEncoder = message.NewMessagesEncoder(app.config.GetBool("pitaya.handler.messages.compression"))
app.configured = true
app.metricsReporters = make([]metrics.Reporter, 0)
AddMetricsReporter(metrics.GetPrometheusReporter(serverType, app.config.GetString("pitaya.game"), app.config.GetInt("pitaya.metrics.prometheus.port")))

defaultTags := app.config.GetStringMapString("pitaya.metrics.tags")
Copy link
Contributor

Choose a reason for hiding this comment

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

can you change the name to GetMapStringString? :)

Copy link
Contributor

Choose a reason for hiding this comment

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

changed my mind

@felipejfc felipejfc merged commit 9765843 into master Jun 26, 2018
@henrod henrod deleted the feature/metrics branch July 18, 2018 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants