Skip to content

Commit

Permalink
Send exponential histograms to GMP
Browse files Browse the repository at this point in the history
  • Loading branch information
aabmass committed Jun 28, 2023
1 parent f778f24 commit b1afc63
Show file tree
Hide file tree
Showing 3 changed files with 386 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exporter/collector/googlemanagedprometheus/naming.go
Expand Up @@ -43,7 +43,7 @@ func GetMetricName(baseName string, metric pmetric.Metric) (string, error) {
return compliantName + "_count/summary", nil
}
return compliantName + "/summary", nil
case pmetric.MetricTypeHistogram:
case pmetric.MetricTypeHistogram, pmetric.MetricTypeExponentialHistogram:
return compliantName + "/histogram", nil
default:
return "", fmt.Errorf("unsupported metric datatype: %v", metric.Type())
Expand Down
Expand Up @@ -472,6 +472,149 @@
}
}
]
},
{
"scope": {
"name": "exponentialhistscope"
},
"metrics": [
{
"name": "exp_hist",
"description": "The request latency in seconds",
"unit": "s",
"exponentialHistogram": {
"dataPoints": [
{
"startTimeUnixNano": "1640104132003289220",
"timeUnixNano": "1640104132005463582",
"count": "10000",
"sum": 1984636.3282113941,
"scale": 4,
"positive": {
"offset": 106,
"bucketCounts": [
"646",
"736",
"733",
"639",
"606",
"585",
"480",
"481",
"411",
"436",
"366",
"304",
"309",
"270",
"226",
"210",
"238",
"169",
"181",
"178",
"149",
"132",
"131",
"117",
"109",
"89",
"107",
"80",
"78",
"75",
"56",
"73",
"59",
"51",
"46",
"53",
"22",
"31",
"35",
"24",
"23",
"31",
"18",
"8",
"16",
"12",
"15",
"13",
"12",
"12",
"12",
"7",
"7",
"7",
"9",
"5",
"4",
"4",
"8",
"6",
"3",
"1",
"4",
"2",
"2",
"4",
"5",
"1",
"2",
"2",
"1",
"0",
"1",
"2",
"2",
"1",
"0",
"0",
"2",
"1",
"2",
"1",
"0",
"2",
"0",
"0",
"2",
"0",
"1",
"1",
"0",
"0",
"0",
"0",
"1",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"1",
"0",
"0",
"0",
"0",
"1",
"1",
"0",
"1"
]
},
"negative": {}
}
],
"aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE"
}
}
]
}
]
}
Expand Down

0 comments on commit b1afc63

Please sign in to comment.