Skip to content

Commit a8400a2

Browse files
committed
Chore: add small optimization to otlp
Signed-off-by: SungJin1212 <[email protected]>
1 parent 59491e9 commit a8400a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/util/push/otlp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func OTLPHandler(maxRecvMsgSize int, overrides *validation.Overrides, cfg distri
7373
}
7474

7575
// convert prompb to cortexpb TimeSeries
76-
tsList := []cortexpb.PreallocTimeseries(nil)
76+
tsList := make([]cortexpb.PreallocTimeseries, 0, len(promTsList))
7777
for _, v := range promTsList {
7878
tsList = append(tsList, cortexpb.PreallocTimeseries{TimeSeries: &cortexpb.TimeSeries{
7979
Labels: makeLabels(v.Labels),

0 commit comments

Comments
 (0)