@@ -18,7 +18,7 @@ service Synchronizer {
1818 rpc GPIDSync (GPIDSyncRequest ) returns (GPIDSyncResponse ) {}
1919 rpc ShareGPIDLocalData (ShareGPIDSyncRequests ) returns (ShareGPIDSyncRequests ) {}
2020 rpc Plugin (PluginRequest ) returns (stream PluginResponse ) {}
21- rpc GetPrometheusLabelIDs (PrometheusLabelIDsRequest ) returns (PrometheusLabelIDsResponse ) {}
21+ rpc GetPrometheusLabelIDs (PrometheusLabelRequest ) returns (PrometheusLabelResponse ) {}
2222}
2323
2424// debug service
@@ -811,7 +811,7 @@ message LabelRequest {
811811 optional string value = 2 ;
812812}
813813
814- message LabelIDResponse {
814+ message LabelResponse {
815815 optional string name = 1 ;
816816 optional string value = 2 ;
817817 optional uint32 name_id = 3 ;
@@ -827,14 +827,28 @@ message MetricLabelRequest {
827827message MetricLabelResponse {
828828 optional string metric_name = 1 ;
829829 optional uint32 metric_id = 2 ;
830- optional uint32 target_id = 3 ; // when the Controller cannot determine the target_id, fill in 0
831- repeated LabelIDResponse label_ids = 4 ;
830+ repeated LabelResponse label_ids = 3 ;
832831}
833832
834- message PrometheusLabelIDsRequest {
833+ message TargetRequest {
834+ optional string job = 1 ;
835+ optional string instance = 2 ;
836+ }
837+
838+ message TargetResponse {
839+ optional string job = 1 ;
840+ optional string instance = 2 ;
841+ optional string job_id = 3 ;
842+ optional string instance_id = 4 ;
843+ optional uint32 target_id = 5 ; // when the Controller cannot determine the target_id, fill in 0
844+ }
845+
846+ message PrometheusLabelRequest {
835847 repeated MetricLabelRequest request_labels = 1 ;
848+ repeated TargetRequest request_targets = 2 ;
836849}
837850
838- message PrometheusLabelIDsResponse {
851+ message PrometheusLabelResponse {
839852 repeated MetricLabelResponse response_label_ids = 1 ;
853+ repeated TargetResponse response_target_ids = 2 ;
840854}
0 commit comments