gitpod/components/ide-metrics-api/idemetrics.proto
2022-08-23 12:40:40 +02:00

44 lines
1.1 KiB
Protocol Buffer

// Copyright (c) 2022 Gitpod GmbH. All rights reserved.
// Licensed under the GNU Affero General Public License (AGPL).
// See License-AGPL.txt in the project root for license information.
syntax = "proto3";
package ide_metrics_api;
import "google/api/annotations.proto";
option go_package = "github.com/gitpod-io/gitpod/ide-metrics/api";
option java_package = "io.gitpod.idemetrics.api";
service MetricsService {
rpc AddCounter(AddCounterRequest) returns (AddCounterResponse) {
option (google.api.http) = {
post : "/metrics/counter/add/{name}"
body : "*"
};
}
rpc ObserveHistogram(ObserveHistogramRequest) returns (ObserveHistogramResponse) {
option (google.api.http) = {
post : "/metrics/histogram/observe/{name}"
body : "*"
};
}
}
message AddCounterRequest {
string name = 1;
map<string, string> labels = 2;
optional int32 value = 3;
}
message AddCounterResponse {}
message ObserveHistogramRequest {
string name = 1;
map<string, string> labels = 2;
double value = 3;
}
message ObserveHistogramResponse {}