diff --git a/client/app/src/main/java/com/birdthedeveloper/prometheus/android/prometheus/android/exporter/worker/RemoteWrite.kt b/client/app/src/main/java/com/birdthedeveloper/prometheus/android/prometheus/android/exporter/worker/RemoteWrite.kt index 76f133a..f9db5c6 100644 --- a/client/app/src/main/java/com/birdthedeveloper/prometheus/android/prometheus/android/exporter/worker/RemoteWrite.kt +++ b/client/app/src/main/java/com/birdthedeveloper/prometheus/android/prometheus/android/exporter/worker/RemoteWrite.kt @@ -5,6 +5,7 @@ data class RemoteWriteConfiguration( val remote_write_endpoint : String, ) -class RemoteWrite { +class RemoteWrite(config : RemoteWriteConfiguration) { + //TODO implement this thing } diff --git a/remote-write.proto b/remote-write.proto new file mode 100644 index 0000000..a26bad3 --- /dev/null +++ b/remote-write.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +message WriteRequest { + repeated TimeSeries timeseries = 1; + // Cortex uses this field to determine the source of the write request. + // We reserve it to avoid any compatibility issues. + reserved 2; + + // Prometheus uses this field to send metadata, but this is + // omitted from v1 of the spec as it is experimental. + reserved 3; +} + +message TimeSeries { + repeated Label labels = 1; + repeated Sample samples = 2; +} + +message Label { + string name = 1; + string value = 2; +} + +message Sample { + double value = 1; + int64 timestamp = 2; +}