Commit 8e8e7428 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Sanitize metric names and properties fields.

parent b75bfeab
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,7 +4,8 @@ All notable changes to this project are documented below.
The format is based on [keep a changelog](http://keepachangelog.com) and this project uses [semantic versioning](http://semver.org).

## [Unreleased]

### Changed
- Sanitize metric names and properties fields.

## [2.12.0] - 2020-05-25
### Added
+5 −4
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ func NewMetrics(logger, startupLogger *zap.Logger, config Config) *Metrics {
		Tags:            tags,
		CachedReporter:  reporter,
		Separator:       prometheus.DefaultSeparator,
		SanitizeOptions: &prometheus.DefaultSanitizerOpts,
	}, time.Duration(config.GetMetrics().ReportingFreqSec)*time.Second)

	// Check if exposing Prometheus metrics directly is enabled.