Skip to content

Commit 6d4e63a

Browse files
committed
[ide-metrics] add error reporting api
1 parent 6df0786 commit 6d4e63a

File tree

6 files changed

+372
-14
lines changed

6 files changed

+372
-14
lines changed

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

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ type MetricsServerConfiguration struct {
2424
RateLimits map[string]grpc.RateLimit `json:"ratelimits"`
2525
CounterMetrics []CounterMetricsConfiguration `json:"counterMetrics"`
2626
HistogramMetrics []HistogramMetricsConfiguration `json:"histogramMetrics"`
27+
ErrorReporting ErrorReportingConfiguration `json:"errorReporting"`
2728
}
2829

2930
type CounterMetricsConfiguration struct {
@@ -39,6 +40,10 @@ type HistogramMetricsConfiguration struct {
3940
Buckets []float64 `json:"buckets"`
4041
}
4142

43+
type ErrorReportingConfiguration struct {
44+
AllowComponents []string `json:"allowComponents"`
45+
}
46+
4247
type ServiceConfiguration struct {
4348
Server MetricsServerConfiguration `json:"server"`
4449

components/ide-metrics/config-example.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
],
2727
"buckets": [1, 10, 100]
2828
}
29-
]
29+
],
30+
"errorReporting": {
31+
"allowComponents": ["supervisor-frontend"]
32+
}
3033
},
3134
"prometheus": {
3235
"addr": "127.0.0.1:9500"

components/ide-metrics/go.mod

+12-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ module github.com/gitpod-io/gitpod/ide-metrics
33
go 1.18
44

55
require (
6+
cloud.google.com/go/errorreporting v0.2.0
7+
cloud.google.com/go/logging v1.5.0
68
github.com/gitpod-io/gitpod/common-go v0.0.0-00010101000000-000000000000
79
github.com/gitpod-io/gitpod/ide-metrics-api v0.0.0-00010101000000-000000000000
810
github.com/gorilla/websocket v1.5.0
@@ -17,13 +19,17 @@ require (
1719
)
1820

1921
require (
22+
cloud.google.com/go v0.102.1 // indirect
23+
cloud.google.com/go/compute v1.7.0 // indirect
2024
github.com/beorn7/perks v1.0.1 // indirect
2125
github.com/cenkalti/backoff/v4 v4.1.1 // indirect
2226
github.com/cespare/xxhash/v2 v2.1.2 // indirect
2327
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
24-
github.com/fsnotify/fsnotify v1.4.9 // indirect
28+
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
2529
github.com/golang/protobuf v1.5.2 // indirect
2630
github.com/google/go-cmp v0.5.8 // indirect
31+
github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa // indirect
32+
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
2733
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
2834
github.com/hashicorp/golang-lru v0.5.1 // indirect
2935
github.com/inconshreveable/mousetrap v1.0.0 // indirect
@@ -35,11 +41,16 @@ require (
3541
github.com/prometheus/procfs v0.7.3 // indirect
3642
github.com/sirupsen/logrus v1.8.1 // indirect
3743
github.com/spf13/pflag v1.0.5 // indirect
44+
go.opencensus.io v0.23.0 // indirect
3845
golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect
46+
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect
47+
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect
3948
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d // indirect
4049
golang.org/x/text v0.3.7 // indirect
4150
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
4251
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
52+
google.golang.org/api v0.84.0 // indirect
53+
google.golang.org/appengine v1.6.7 // indirect
4354
google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad // indirect
4455
google.golang.org/protobuf v1.28.0 // indirect
4556
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)