Skip to content

Commit bbdda64

Browse files
akosyakovroboquat
authored andcommitted
fix #13710: reduce cost of supervisor observability
Co-authored-by: Pudong [email protected]
1 parent 1a8f1b6 commit bbdda64

File tree

31 files changed

+5075
-178
lines changed

31 files changed

+5075
-178
lines changed

components/ide-metrics-api/go/config/config.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ type LabelAllowList struct {
2020
}
2121

2222
type MetricsServerConfiguration struct {
23-
Port int `json:"port"`
24-
RateLimits map[string]grpc.RateLimit `json:"ratelimits"`
25-
CounterMetrics []CounterMetricsConfiguration `json:"counterMetrics"`
26-
HistogramMetrics []HistogramMetricsConfiguration `json:"histogramMetrics"`
27-
ErrorReporting ErrorReportingConfiguration `json:"errorReporting"`
23+
Port int `json:"port"`
24+
RateLimits map[string]grpc.RateLimit `json:"ratelimits"`
25+
CounterMetrics []CounterMetricsConfiguration `json:"counterMetrics"`
26+
HistogramMetrics []HistogramMetricsConfiguration `json:"histogramMetrics"`
27+
AggregatedHistogramMetrics []HistogramMetricsConfiguration `json:"aggregatedHistogramMetrics"`
28+
ErrorReporting ErrorReportingConfiguration `json:"errorReporting"`
2829
}
2930

3031
type CounterMetricsConfiguration struct {

components/ide-metrics-api/go/idemetrics.pb.go

Lines changed: 254 additions & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/ide-metrics-api/go/idemetrics.pb.gw.go

Lines changed: 119 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/ide-metrics-api/go/idemetrics_grpc.pb.go

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/ide-metrics-api/idemetrics.proto

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ service MetricsService {
2424
body : "*"
2525
};
2626
}
27+
rpc AddHistogram(AddHistogramRequest) returns (AddHistogramResponse) {
28+
option (google.api.http) = {
29+
post : "/metrics/histogram/add/{name}"
30+
body : "*"
31+
};
32+
}
2733
rpc reportError(ReportErrorRequest) returns (ReportErrorResponse) {
2834
option (google.api.http) = {
2935
post: "/reportError"
@@ -48,6 +54,16 @@ message ObserveHistogramRequest {
4854

4955
message ObserveHistogramResponse {}
5056

57+
message AddHistogramRequest {
58+
string name = 1;
59+
map<string, string> labels = 2;
60+
uint64 count = 3;
61+
double sum = 4;
62+
repeated uint64 buckets = 5;
63+
}
64+
65+
message AddHistogramResponse {}
66+
5167
message ReportErrorRequest {
5268
string error_stack = 1;
5369
string component = 2;

0 commit comments

Comments
 (0)