Skip to content

Commit

Permalink
set sum of squared deviations in GMP exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Apr 20, 2022
1 parent 951f988 commit ff64376
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions exporter/collector/googlemanagedprometheus/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func (c *GMPConfig) toCollectorConfig() collector.Config {
cfg.MetricConfig.ServiceResourceLabels = false
cfg.MetricConfig.GetMetricName = GetMetricName
cfg.MetricConfig.MapMonitoredResource = MapToPrometheusTarget
cfg.MetricConfig.EnableSumOfSquaredDeviation = true
// map the GMP config's fields to the collector config
cfg.ProjectID = c.ProjectID
cfg.UserAgent = c.UserAgent
Expand Down
1 change: 1 addition & 0 deletions exporter/collector/integrationtest/testcases.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ var (
cfg.MetricConfig.MapMonitoredResource = googlemanagedprometheus.MapToPrometheusTarget
cfg.MetricConfig.InstrumentationLibraryLabels = false
cfg.MetricConfig.ServiceResourceLabels = false
cfg.MetricConfig.EnableSumOfSquaredDeviation = true
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
"distributionValue": {
"count": "1",
"mean": 2,
"sumOfSquaredDeviation": 2.25,
"bucketOptions": {
"explicitBuckets": {
"bounds": [
Expand Down Expand Up @@ -191,6 +192,7 @@
"distributionValue": {
"count": "2",
"mean": 7,
"sumOfSquaredDeviation": 76.25,
"bucketOptions": {
"explicitBuckets": {
"bounds": [
Expand Down

0 comments on commit ff64376

Please sign in to comment.