We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When temporalio/sdk-go#756 is released, apply this:
diff --git a/metrics/worker/main.go b/metrics/worker/main.go index c1dc254..e3dde80 100644 --- a/metrics/worker/main.go +++ b/metrics/worker/main.go @@ -53,35 +53,12 @@ func newPrometheusScope(c prometheus.Configuration) tally.Scope { scopeOpts := tally.ScopeOptions{ CachedReporter: reporter, Separator: prometheus.DefaultSeparator, - SanitizeOptions: &sanitizeOptions, + SanitizeOptions: &sdktally.PrometheusSanitizeOptions, Prefix: "temporal_samples", } scope, _ := tally.NewRootScope(scopeOpts, time.Second) + scope = sdktally.NewPrometheusNamingScope(scope) log.Println("prometheus metrics scope created") return scope } - -// tally sanitizer options that satisfy Prometheus restrictions. -// This will rename metrics at the tally emission level, so metrics name we -// use maybe different from what gets emitted. In the current implementation -// it will replace - and . with _ -var ( - safeCharacters = []rune{'_'} - - sanitizeOptions = tally.SanitizeOptions{ - NameCharacters: tally.ValidCharacters{ - Ranges: tally.AlphanumericRange, - Characters: safeCharacters, - }, - KeyCharacters: tally.ValidCharacters{ - Ranges: tally.AlphanumericRange, - Characters: safeCharacters, - }, - ValueCharacters: tally.ValidCharacters{ - Ranges: tally.AlphanumericRange, - Characters: safeCharacters, - }, - ReplacementCharacter: tally.DefaultReplacementCharacter, - } -)
The text was updated successfully, but these errors were encountered:
Closing as this change was done
Sorry, something went wrong.
No branches or pull requests
Describe the solution you'd like
When temporalio/sdk-go#756 is released, apply this:
The text was updated successfully, but these errors were encountered: