From 4326d547606ca81bd3600cdd379414f033f1e8ad Mon Sep 17 00:00:00 2001 From: Carrie Edwards Date: Tue, 31 Mar 2026 08:38:45 -0700 Subject: [PATCH] Rename created timestamp to start timestamp in proto (#18368) Signed-off-by: Carrie Edwards --- docs/configuration/configuration.md | 2 +- model/textparse/interface.go | 4 +- model/textparse/nhcbparse_test.go | 10 +- model/textparse/openmetricsparse.go | 8 +- model/textparse/protobufparse.go | 6 +- model/textparse/protobufparse_test.go | 8 +- prompb/io/prometheus/client/decoder.go | 6 +- prompb/io/prometheus/client/metrics.pb.go | 192 +++++++++++----------- prompb/io/prometheus/client/metrics.proto | 6 +- 9 files changed, 121 insertions(+), 121 deletions(-) diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index 8457b7598d..e1792d9632 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -3663,7 +3663,7 @@ url: # * The `prometheus.WriteRequest` represents the message introduced in Remote Write 1.0, which # will be deprecated eventually. # * The `io.prometheus.write.v2.Request` was introduced in Remote Write 2.0 and replaces the former, -# by improving efficiency and sending metadata, created timestamp and native histograms by default. +# by improving efficiency and sending metadata, start timestamp and native histograms by default. # # Before changing this value, consult with your remote storage provider (or test) what message it supports. # Read more on https://prometheus.io/docs/specs/remote_write_spec_2_0/#io-prometheus-write-v2-request diff --git a/model/textparse/interface.go b/model/textparse/interface.go index 08d9a080a7..d2a3c94e2f 100644 --- a/model/textparse/interface.go +++ b/model/textparse/interface.go @@ -76,9 +76,9 @@ type Parser interface { // retrieved (including the case where no exemplars exist at all). Exemplar(l *exemplar.Exemplar) bool - // StartTimestamp returns the created timestamp (in milliseconds) for the + // StartTimestamp returns the start timestamp (in milliseconds) for the // current sample. It returns 0 if it is unknown e.g. if it wasn't set or - // if the scrape protocol or metric type does not support created timestamps. + // if the scrape protocol or metric type does not support start timestamps. StartTimestamp() int64 // Next advances the parser to the next sample. diff --git a/model/textparse/nhcbparse_test.go b/model/textparse/nhcbparse_test.go index 9a27c16ea8..43afe3de34 100644 --- a/model/textparse/nhcbparse_test.go +++ b/model/textparse/nhcbparse_test.go @@ -773,7 +773,7 @@ help: "Test histogram 1" type: HISTOGRAM metric: < histogram: < - created_timestamp: < + start_timestamp: < seconds: 1 nanos: 1 > @@ -798,7 +798,7 @@ help: "Test histogram 2" type: HISTOGRAM metric: < histogram: < - created_timestamp: < + start_timestamp: < seconds: 1 nanos: 1 > @@ -851,7 +851,7 @@ help: "Test histogram 3" type: HISTOGRAM metric: < histogram: < - created_timestamp: < + start_timestamp: < seconds: 1 nanos: 1 > @@ -969,7 +969,7 @@ help: "Test histogram 1" type: HISTOGRAM metric: < histogram: < - created_timestamp: < + start_timestamp: < seconds: 1 nanos: 1 > @@ -1012,7 +1012,7 @@ help: "Test histogram 2" type: HISTOGRAM metric: < histogram: < - created_timestamp: < + start_timestamp: < seconds: 1 nanos: 1 > diff --git a/model/textparse/openmetricsparse.go b/model/textparse/openmetricsparse.go index 2f6671eb62..9678d6d152 100644 --- a/model/textparse/openmetricsparse.go +++ b/model/textparse/openmetricsparse.go @@ -102,7 +102,7 @@ type OpenMetricsParser struct { exemplarTs int64 hasExemplarTs bool - // Created timestamp parsing state. + // Start timestamp parsing state. st int64 stHashSet uint64 // ignoreExemplar instructs the parser to not overwrite exemplars (to keep them while peeking ahead). @@ -122,11 +122,11 @@ type openMetricsParserOptions struct { type OpenMetricsOption func(*openMetricsParserOptions) // WithOMParserSTSeriesSkipped turns off exposing _created lines -// as series, which makes those only used for parsing created timestamp +// as series, which makes those only used for parsing start timestamp // for `StartTimestamp` method purposes. // // It's recommended to use this option to avoid using _created lines for other -// purposes than created timestamp, but leave false by default for the +// purposes than start timestamp, but leave false by default for the // best-effort compatibility. func WithOMParserSTSeriesSkipped() OpenMetricsOption { return func(o *openMetricsParserOptions) { @@ -285,7 +285,7 @@ func (p *OpenMetricsParser) Exemplar(e *exemplar.Exemplar) bool { return true } -// StartTimestamp returns the created timestamp for a current Metric if exists or nil. +// StartTimestamp returns the start timestamp for a current Metric if exists or nil. // NOTE(Maniktherana): Might use additional CPU/mem resources due to deep copy of parser required for peeking given 1.0 OM specification on _created series. func (p *OpenMetricsParser) StartTimestamp() int64 { if !typeRequiresST(p.mtype) { diff --git a/model/textparse/protobufparse.go b/model/textparse/protobufparse.go index 3795c28589..62f1d64431 100644 --- a/model/textparse/protobufparse.go +++ b/model/textparse/protobufparse.go @@ -404,11 +404,11 @@ func (p *ProtobufParser) StartTimestamp() int64 { var st *types.Timestamp switch p.dec.GetType() { case dto.MetricType_COUNTER: - st = p.dec.GetCounter().GetCreatedTimestamp() + st = p.dec.GetCounter().GetStartTimestamp() case dto.MetricType_SUMMARY: - st = p.dec.GetSummary().GetCreatedTimestamp() + st = p.dec.GetSummary().GetStartTimestamp() case dto.MetricType_HISTOGRAM, dto.MetricType_GAUGE_HISTOGRAM: - st = p.dec.GetHistogram().GetCreatedTimestamp() + st = p.dec.GetHistogram().GetStartTimestamp() default: } if st == nil { diff --git a/model/textparse/protobufparse_test.go b/model/textparse/protobufparse_test.go index 12e4b959a7..7eff1e7387 100644 --- a/model/textparse/protobufparse_test.go +++ b/model/textparse/protobufparse_test.go @@ -608,7 +608,7 @@ type: COUNTER metric: < counter: < value: 42 - created_timestamp: < + start_timestamp: < seconds: 1625851153 nanos: 146848499 > @@ -623,7 +623,7 @@ metric: < summary: < sample_count: 42 sample_sum: 1.234 - created_timestamp: < + start_timestamp: < seconds: 1625851153 nanos: 146848499 > @@ -636,7 +636,7 @@ help: "A histogram with a created timestamp." type: HISTOGRAM metric: < histogram: < - created_timestamp: < + start_timestamp: < seconds: 1625851153 nanos: 146848499 > @@ -653,7 +653,7 @@ help: "A gauge histogram with a created timestamp." type: GAUGE_HISTOGRAM metric: < histogram: < - created_timestamp: < + start_timestamp: < seconds: 1625851153 nanos: 146848499 > diff --git a/prompb/io/prometheus/client/decoder.go b/prompb/io/prometheus/client/decoder.go index de7184c4b5..9d1586dd2e 100644 --- a/prompb/io/prometheus/client/decoder.go +++ b/prompb/io/prometheus/client/decoder.go @@ -114,7 +114,7 @@ func (m *MetricStreamingDecoder) resetMetric() { // TODO(bwplotka): Autogenerate reset functions. if m.Counter != nil { m.Counter.Value = 0 - m.Counter.CreatedTimestamp = nil + m.Counter.StartTimestamp = nil m.Counter.Exemplar = nil } if m.Gauge != nil { @@ -125,7 +125,7 @@ func (m *MetricStreamingDecoder) resetMetric() { m.Histogram.SampleCountFloat = 0 m.Histogram.SampleSum = 0 m.Histogram.Bucket = m.Histogram.Bucket[:0] - m.Histogram.CreatedTimestamp = nil + m.Histogram.StartTimestamp = nil m.Histogram.Schema = 0 m.Histogram.ZeroThreshold = 0 m.Histogram.ZeroCount = 0 @@ -142,7 +142,7 @@ func (m *MetricStreamingDecoder) resetMetric() { m.Summary.SampleCount = 0 m.Summary.SampleSum = 0 m.Summary.Quantile = m.Summary.Quantile[:0] - m.Summary.CreatedTimestamp = nil + m.Summary.StartTimestamp = nil } } diff --git a/prompb/io/prometheus/client/metrics.pb.go b/prompb/io/prometheus/client/metrics.pb.go index 17cab6081e..5b47756c62 100644 --- a/prompb/io/prometheus/client/metrics.pb.go +++ b/prompb/io/prometheus/client/metrics.pb.go @@ -174,7 +174,7 @@ func (m *Gauge) GetValue() float64 { type Counter struct { Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` Exemplar *Exemplar `protobuf:"bytes,2,opt,name=exemplar,proto3" json:"exemplar,omitempty"` - CreatedTimestamp *types.Timestamp `protobuf:"bytes,3,opt,name=created_timestamp,json=createdTimestamp,proto3" json:"created_timestamp,omitempty"` + StartTimestamp *types.Timestamp `protobuf:"bytes,3,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -227,9 +227,9 @@ func (m *Counter) GetExemplar() *Exemplar { return nil } -func (m *Counter) GetCreatedTimestamp() *types.Timestamp { +func (m *Counter) GetStartTimestamp() *types.Timestamp { if m != nil { - return m.CreatedTimestamp + return m.StartTimestamp } return nil } @@ -293,7 +293,7 @@ type Summary struct { SampleCount uint64 `protobuf:"varint,1,opt,name=sample_count,json=sampleCount,proto3" json:"sample_count,omitempty"` SampleSum float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum,proto3" json:"sample_sum,omitempty"` Quantile []Quantile `protobuf:"bytes,3,rep,name=quantile,proto3" json:"quantile"` - CreatedTimestamp *types.Timestamp `protobuf:"bytes,4,opt,name=created_timestamp,json=createdTimestamp,proto3" json:"created_timestamp,omitempty"` + StartTimestamp *types.Timestamp `protobuf:"bytes,4,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -353,9 +353,9 @@ func (m *Summary) GetQuantile() []Quantile { return nil } -func (m *Summary) GetCreatedTimestamp() *types.Timestamp { +func (m *Summary) GetStartTimestamp() *types.Timestamp { if m != nil { - return m.CreatedTimestamp + return m.StartTimestamp } return nil } @@ -412,8 +412,8 @@ type Histogram struct { SampleCountFloat float64 `protobuf:"fixed64,4,opt,name=sample_count_float,json=sampleCountFloat,proto3" json:"sample_count_float,omitempty"` SampleSum float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum,proto3" json:"sample_sum,omitempty"` // Buckets for the classic histogram. - Bucket []Bucket `protobuf:"bytes,3,rep,name=bucket,proto3" json:"bucket"` - CreatedTimestamp *types.Timestamp `protobuf:"bytes,15,opt,name=created_timestamp,json=createdTimestamp,proto3" json:"created_timestamp,omitempty"` + Bucket []Bucket `protobuf:"bytes,3,rep,name=bucket,proto3" json:"bucket"` + StartTimestamp *types.Timestamp `protobuf:"bytes,15,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"` // schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8. // They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and // then each power of two is divided into 2^n logarithmic buckets. @@ -508,9 +508,9 @@ func (m *Histogram) GetBucket() []Bucket { return nil } -func (m *Histogram) GetCreatedTimestamp() *types.Timestamp { +func (m *Histogram) GetStartTimestamp() *types.Timestamp { if m != nil { - return m.CreatedTimestamp + return m.StartTimestamp } return nil } @@ -983,68 +983,68 @@ func init() { var fileDescriptor_d1e5ddb18987a258 = []byte{ // 982 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x8f, 0xdb, 0x44, - 0x18, 0xae, 0x9b, 0x4f, 0xbf, 0xd9, 0x6c, 0xbd, 0x43, 0x54, 0x59, 0x0b, 0xbb, 0x09, 0x96, 0x90, - 0x16, 0x84, 0x12, 0x01, 0x45, 0xa0, 0xb2, 0x48, 0xec, 0xb6, 0xdb, 0x14, 0x95, 0xb4, 0x65, 0x92, - 0x1c, 0xca, 0xc5, 0x9a, 0x24, 0xb3, 0x8e, 0x85, 0xbf, 0xb0, 0xc7, 0x15, 0xcb, 0x9d, 0xdf, 0xc0, - 0x1f, 0xe0, 0x67, 0x70, 0x46, 0x3d, 0x72, 0xe2, 0x88, 0xd0, 0xfe, 0x0e, 0x0e, 0x68, 0xbe, 0xec, - 0x6c, 0xe5, 0x2c, 0x2c, 0xdc, 0x3c, 0x8f, 0x9f, 0x67, 0xe6, 0x79, 0x1f, 0xdb, 0xef, 0x6b, 0x70, - 0xfc, 0x78, 0x94, 0xa4, 0x71, 0x48, 0xd9, 0x9a, 0xe6, 0xd9, 0x68, 0x19, 0xf8, 0x34, 0x62, 0xa3, - 0x90, 0xb2, 0xd4, 0x5f, 0x66, 0xc3, 0x24, 0x8d, 0x59, 0x8c, 0x7a, 0x7e, 0x3c, 0x2c, 0x39, 0x43, - 0xc9, 0xd9, 0xef, 0x79, 0xb1, 0x17, 0x0b, 0xc2, 0x88, 0x5f, 0x49, 0xee, 0x7e, 0xdf, 0x8b, 0x63, - 0x2f, 0xa0, 0x23, 0xb1, 0x5a, 0xe4, 0xe7, 0x23, 0xe6, 0x87, 0x34, 0x63, 0x24, 0x4c, 0x24, 0xc1, - 0xf9, 0x18, 0xcc, 0xaf, 0xc8, 0x82, 0x06, 0xcf, 0x89, 0x9f, 0x22, 0x04, 0xf5, 0x88, 0x84, 0xd4, - 0x36, 0x06, 0xc6, 0x91, 0x89, 0xc5, 0x35, 0xea, 0x41, 0xe3, 0x25, 0x09, 0x72, 0x6a, 0xdf, 0x16, - 0xa0, 0x5c, 0x38, 0x07, 0xd0, 0x18, 0x93, 0xdc, 0xdb, 0xb8, 0xcd, 0x35, 0x86, 0xbe, 0xfd, 0xb3, - 0x01, 0xad, 0x07, 0x71, 0x1e, 0x31, 0x9a, 0x56, 0x33, 0xd0, 0x7d, 0x68, 0xd3, 0xef, 0x69, 0x98, - 0x04, 0x24, 0x15, 0x3b, 0x77, 0x3e, 0x3c, 0x1c, 0x56, 0xd5, 0x35, 0x3c, 0x53, 0x2c, 0x5c, 0xf0, - 0xd1, 0x18, 0xf6, 0x96, 0x29, 0x25, 0x8c, 0xae, 0xdc, 0xa2, 0x1c, 0xbb, 0x26, 0x36, 0xd9, 0x1f, - 0xca, 0x82, 0x87, 0xba, 0xe0, 0xe1, 0x4c, 0x33, 0xb0, 0xa5, 0x44, 0x05, 0xe2, 0x1c, 0x43, 0xfb, - 0xeb, 0x9c, 0x44, 0xcc, 0x0f, 0x28, 0xda, 0x87, 0xf6, 0x77, 0xea, 0x5a, 0x39, 0x2d, 0xd6, 0x57, - 0x33, 0x28, 0x8a, 0xfc, 0xdd, 0x80, 0xd6, 0x34, 0x0f, 0x43, 0x92, 0x5e, 0xa0, 0xb7, 0x61, 0x27, - 0x23, 0x61, 0x12, 0x50, 0x77, 0xc9, 0xcb, 0x16, 0x3b, 0xd4, 0x71, 0x47, 0x62, 0x22, 0x09, 0x74, - 0x00, 0xa0, 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, + 0xa7, 0x36, 0xb0, 0x0e, 0xef, 0x61, 0xbd, 0x42, 0xef, 0x40, 0xe7, 0x07, 0x9a, 0x30, 0x8f, 0xaf, + 0x12, 0x9a, 0xae, 0x58, 0x70, 0xe1, 0xd4, 0xa5, 0xf7, 0xb6, 0x40, 0xa7, 0x06, 0x14, 0xe5, 0x49, + 0x9a, 0x4a, 0xab, 0x21, 0xd3, 0xb2, 0x05, 0xa2, 0xb2, 0x3a, 0x84, 0x6e, 0x71, 0x5b, 0x27, 0xd5, + 0x94, 0xfb, 0x74, 0x72, 0x92, 0xca, 0xe9, 0x29, 0xb4, 0x23, 0xba, 0x24, 0xdc, 0x7f, 0x45, 0xbd, + 0x34, 0x26, 0x91, 0x63, 0xcb, 0x3c, 0x06, 0xb7, 0xe5, 0x31, 0x89, 0x49, 0xa4, 0x33, 0xd9, 0x31, + 0x62, 0x81, 0x09, 0xf3, 0xf9, 0x66, 0x17, 0x34, 0xe0, 0xc4, 0x81, 0x41, 0xe5, 0x10, 0xe1, 0xfc, + 0x88, 0x47, 0x02, 0xbc, 0x41, 0x53, 0x05, 0xb4, 0x06, 0x15, 0x51, 0xa3, 0x41, 0x55, 0x11, 0x4f, + 0xa1, 0x1d, 0xb3, 0xd4, 0x2f, 0xac, 0xed, 0x6c, 0x67, 0xcd, 0x88, 0x8d, 0xb5, 0x7c, 0x33, 0x65, + 0xad, 0xad, 0xac, 0x19, 0x34, 0xb7, 0x96, 0xd3, 0x94, 0xb5, 0x8e, 0xb2, 0x66, 0x50, 0x65, 0xed, + 0x08, 0x6c, 0xd3, 0x41, 0x52, 0xa7, 0x7b, 0xdb, 0x57, 0x96, 0xb7, 0x9c, 0x42, 0xe0, 0xfe, 0x6a, + 0x41, 0x5d, 0xd9, 0x45, 0xef, 0x42, 0x77, 0x91, 0x85, 0x59, 0xb0, 0x1e, 0x86, 0x7a, 0xf7, 0x77, + 0x0b, 0x5c, 0x9d, 0xf9, 0x00, 0xee, 0xbf, 0x49, 0xbd,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a, 0x00, 0x00, } func (m *LabelPair) Marshal() (dAtA []byte, err error) { @@ -1145,9 +1145,9 @@ func (m *Counter) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if m.CreatedTimestamp != nil { + if m.StartTimestamp != nil { { - size, err := m.CreatedTimestamp.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.StartTimestamp.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1241,9 +1241,9 @@ func (m *Summary) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if m.CreatedTimestamp != nil { + if m.StartTimestamp != nil { { - size, err := m.CreatedTimestamp.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.StartTimestamp.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1354,9 +1354,9 @@ func (m *Histogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x82 } } - if m.CreatedTimestamp != nil { + if m.StartTimestamp != nil { { - size, err := m.CreatedTimestamp.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.StartTimestamp.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1892,8 +1892,8 @@ func (m *Counter) Size() (n int) { l = m.Exemplar.Size() n += 1 + l + sovMetrics(uint64(l)) } - if m.CreatedTimestamp != nil { - l = m.CreatedTimestamp.Size() + if m.StartTimestamp != nil { + l = m.StartTimestamp.Size() n += 1 + l + sovMetrics(uint64(l)) } if m.XXX_unrecognized != nil { @@ -1938,8 +1938,8 @@ func (m *Summary) Size() (n int) { n += 1 + l + sovMetrics(uint64(l)) } } - if m.CreatedTimestamp != nil { - l = m.CreatedTimestamp.Size() + if m.StartTimestamp != nil { + l = m.StartTimestamp.Size() n += 1 + l + sovMetrics(uint64(l)) } if m.XXX_unrecognized != nil { @@ -2028,8 +2028,8 @@ func (m *Histogram) Size() (n int) { if len(m.PositiveCount) > 0 { n += 1 + sovMetrics(uint64(len(m.PositiveCount)*8)) + len(m.PositiveCount)*8 } - if m.CreatedTimestamp != nil { - l = m.CreatedTimestamp.Size() + if m.StartTimestamp != nil { + l = m.StartTimestamp.Size() n += 1 + l + sovMetrics(uint64(l)) } if len(m.Exemplars) > 0 { @@ -2447,7 +2447,7 @@ func (m *Counter) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedTimestamp", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartTimestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2474,10 +2474,10 @@ func (m *Counter) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CreatedTimestamp == nil { - m.CreatedTimestamp = &types.Timestamp{} + if m.StartTimestamp == nil { + m.StartTimestamp = &types.Timestamp{} } - if err := m.CreatedTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.StartTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2671,7 +2671,7 @@ func (m *Summary) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedTimestamp", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartTimestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2698,10 +2698,10 @@ func (m *Summary) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CreatedTimestamp == nil { - m.CreatedTimestamp = &types.Timestamp{} + if m.StartTimestamp == nil { + m.StartTimestamp = &types.Timestamp{} } - if err := m.CreatedTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.StartTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3289,7 +3289,7 @@ func (m *Histogram) Unmarshal(dAtA []byte) error { } case 15: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedTimestamp", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartTimestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3316,10 +3316,10 @@ func (m *Histogram) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CreatedTimestamp == nil { - m.CreatedTimestamp = &types.Timestamp{} + if m.StartTimestamp == nil { + m.StartTimestamp = &types.Timestamp{} } - if err := m.CreatedTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.StartTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/prompb/io/prometheus/client/metrics.proto b/prompb/io/prometheus/client/metrics.proto index 681554a7ca..843964ca38 100644 --- a/prompb/io/prometheus/client/metrics.proto +++ b/prompb/io/prometheus/client/metrics.proto @@ -52,7 +52,7 @@ message Counter { double value = 1; Exemplar exemplar = 2; - google.protobuf.Timestamp created_timestamp = 3; + google.protobuf.Timestamp start_timestamp = 3; } message Quantile { @@ -65,7 +65,7 @@ message Summary { double sample_sum = 2; repeated Quantile quantile = 3 [(gogoproto.nullable) = false]; - google.protobuf.Timestamp created_timestamp = 4; + google.protobuf.Timestamp start_timestamp = 4; } message Untyped { @@ -79,7 +79,7 @@ message Histogram { // Buckets for the classic histogram. repeated Bucket bucket = 3 [(gogoproto.nullable) = false]; // Ordered in increasing order of upper_bound, +Inf bucket is optional. - google.protobuf.Timestamp created_timestamp = 15; + google.protobuf.Timestamp start_timestamp = 15; // Everything below here is for native histograms (formerly known as sparse histograms).