This commit is contained in:
Martin Ptáček
2023-06-04 08:57:17 +02:00
parent 2ca432d2d2
commit 0a327b0450
2 changed files with 15 additions and 1 deletions

12
client/Makefile Normal file
View File

@ -0,0 +1,12 @@
# Makefile for protobuf generation for remote write prometheus protocol
.PHONY: protobuf
SRC_DIR_PROTO=app/src/main/java/com/birdthedeveloper/prometheus/android/prometheus/android/exporter/proto
DST_DIR_PROTO=../proto-gen/
protobuf:
mkdir -p $(DST_DIR_PROTO)
protoc -I=$(SRC_DIR_PROTO) --kotlin_out=$(DST_DIR_PROTO) $(SRC_DIR_PROTO)/remote-write.proto
#TODO

View File

@ -1,5 +1,7 @@
syntax = "proto3"; syntax = "proto3";
package proto;
message WriteRequest { message WriteRequest {
repeated TimeSeries timeseries = 1; repeated TimeSeries timeseries = 1;
// Cortex uses this field to determine the source of the write request. // Cortex uses this field to determine the source of the write request.
@ -23,5 +25,5 @@ message Label {
message Sample { message Sample {
double value = 1; double value = 1;
int64 timestamp = 2; int64 timestamp = 2; // in ms
} }