Skip to content

Commit bd41c24

Browse files
committed
Change logic around AppendWALMetadata; introduce StoreMetadata similar to StoreSeries
Signed-off-by: Paschalis Tsilias <[email protected]>
1 parent 3f967e1 commit bd41c24

File tree

9 files changed

+164
-323
lines changed

9 files changed

+164
-323
lines changed

prompb/types.pb.go

Lines changed: 88 additions & 97 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prompb/types.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ message TimeSeries {
147147
repeated Sample samples = 2 [(gogoproto.nullable) = false];
148148
repeated Exemplar exemplars = 3 [(gogoproto.nullable) = false];
149149
repeated Histogram histograms = 4 [(gogoproto.nullable) = false];
150-
repeated Metadata metadatas = 5 [(gogoproto.nullable) = false];
150+
Metadata metadata = 5 [(gogoproto.nullable) = false];
151151
}
152152

153153
message Label {

storage/remote/codec_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ var writeRequestFixture = &prompb.WriteRequest{
5757
Samples: []prompb.Sample{{Value: 1, Timestamp: 0}},
5858
Exemplars: []prompb.Exemplar{{Labels: []prompb.Label{{Name: "f", Value: "g"}}, Value: 1, Timestamp: 0}},
5959
Histograms: []prompb.Histogram{HistogramToHistogramProto(0, &testHistogram), FloatHistogramToHistogramProto(1, testHistogram.ToFloat())},
60-
Metadatas: []prompb.Metadata{{Type: prompb.Metadata_COUNTER, Help: "help text 1", Unit: "unit text 1"}},
60+
Metadata: prompb.Metadata{Type: prompb.Metadata_COUNTER, Help: "help text 1", Unit: "unit text 1"},
6161
},
6262
{
6363
Labels: []prompb.Label{
@@ -70,7 +70,7 @@ var writeRequestFixture = &prompb.WriteRequest{
7070
Samples: []prompb.Sample{{Value: 2, Timestamp: 1}},
7171
Exemplars: []prompb.Exemplar{{Labels: []prompb.Label{{Name: "h", Value: "i"}}, Value: 2, Timestamp: 1}},
7272
Histograms: []prompb.Histogram{HistogramToHistogramProto(2, &testHistogram), FloatHistogramToHistogramProto(3, testHistogram.ToFloat())},
73-
Metadatas: []prompb.Metadata{{Type: prompb.Metadata_GAUGE, Help: "help text 2", Unit: "unit text 2"}},
73+
Metadata: prompb.Metadata{Type: prompb.Metadata_GAUGE, Help: "help text 2", Unit: "unit text 2"},
7474
},
7575
},
7676
}

0 commit comments

Comments
 (0)