zero/telemetry: collect limited core metrics (#5142)

This commit is contained in:
Denis Mishin 2024-06-18 19:15:11 -04:00 committed by GitHub
parent 71cda4628d
commit 8d206e0087
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 102 additions and 14 deletions

View file

@ -364,7 +364,7 @@ type EnvoyMetricsRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// only include metrics that match the provided labels, and relabel them with the provided labels
// only include metrics that match the provided labels
Metrics []string `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"`
// only include labels that match the provided labels
Labels []string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty"`
@ -421,6 +421,9 @@ type PomeriumMetricsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// only include metrics that match the provided labels
Metrics []string `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"`
}
func (x *PomeriumMetricsRequest) Reset() {
@ -455,6 +458,13 @@ func (*PomeriumMetricsRequest) Descriptor() ([]byte, []int) {
return file_connect_proto_rawDescGZIP(), []int{7}
}
func (x *PomeriumMetricsRequest) GetMetrics() []string {
if x != nil {
return x.Metrics
}
return nil
}
var File_connect_proto protoreflect.FileDescriptor
var file_connect_proto_rawDesc = []byte{
@ -511,17 +521,18 @@ var file_connect_proto_rawDesc = []byte{
0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52,
0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x22, 0x18, 0x0a, 0x16, 0x50, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x4d, 0x65, 0x74, 0x72,
0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x51, 0x0a, 0x07, 0x43, 0x6f,
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
0x62, 0x65, 0x12, 0x1f, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x7a, 0x65,
0x72, 0x6f, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x7a,
0x65, 0x72, 0x6f, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x30, 0x01, 0x42, 0x2f, 0x5a,
0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6f, 0x6d, 0x65,
0x72, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x6b,
0x67, 0x2f, 0x7a, 0x65, 0x72, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x22, 0x32, 0x0a, 0x16, 0x50, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x4d, 0x65, 0x74, 0x72,
0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65,
0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74,
0x72, 0x69, 0x63, 0x73, 0x32, 0x51, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12,
0x46, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1f, 0x2e, 0x70,
0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x7a, 0x65, 0x72, 0x6f, 0x2e, 0x53, 0x75, 0x62,
0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x7a, 0x65, 0x72, 0x6f, 0x2e, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x30, 0x01, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2f, 0x70,
0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x7a, 0x65, 0x72, 0x6f,
0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View file

@ -48,14 +48,17 @@ message SessionAnalyticsRequest {}
// EnvoyMetricsRequest is used to request current envoy metrics
message EnvoyMetricsRequest {
// only include metrics that match the provided labels, and relabel them with the provided labels
// only include metrics that match the provided labels
repeated string metrics = 1;
// only include labels that match the provided labels
repeated string labels = 2;
}
// PomeriumMetricsRequest is used to request current pomerium metrics
message PomeriumMetricsRequest {}
message PomeriumMetricsRequest {
// only include metrics that match the provided labels
repeated string metrics = 1;
}
// Connect service is used to maintain a persistent connection between the
// Pomerium Core and Zero Cloud and receive messages from the cloud.