syntax = "proto3"; package logproto; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/grafana/loki/pkg/push"; service Pusher { rpc Push(PushRequest) returns (PushResponse) {} } message PushRequest { repeated StreamAdapter streams = 1 [ (gogoproto.jsontag) = "streams", (gogoproto.customtype) = "Stream" ]; } message PushResponse {} message StreamAdapter { string labels = 1 [(gogoproto.jsontag) = "labels"]; repeated EntryAdapter entries = 2 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "entries" ]; // hash contains the original hash of the stream. uint64 hash = 3 [(gogoproto.jsontag) = "-"]; } message LabelPairAdapter { string name = 1; string value = 2; } message EntryAdapter { google.protobuf.Timestamp timestamp = 1 [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.jsontag) = "ts" ]; string line = 2 [(gogoproto.jsontag) = "line"]; repeated LabelPairAdapter structuredMetadata = 3 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "structuredMetadata,omitempty" ]; // This field shouldn't be used by clients to push data to Loki. // It is only used by Loki to return parsed log lines in query responses. // TODO: Remove this field from the write path Proto. repeated LabelPairAdapter parsed = 4 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "parsed,omitempty" ]; }