mirror of
https://github.com/mii443/prometheus-android-exporter.git
synced 2025-08-22 15:15:35 +00:00
protobuf #2
This commit is contained in:
12
client/Makefile
Normal file
12
client/Makefile
Normal 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
|
@ -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
|
||||||
}
|
}
|
Reference in New Issue
Block a user