You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* update proto to v0.8.0
* regenerate protos using 0.8.0
* update uses of DoubleGauge, DoubleSum, DoubleHistogram, DoubleSummary, DoubleDataPoint, DoubleHistogramDataPoint, DoubleSummaryDataPoint, DoubleExemplar
* update ExemplarSlice to use []*otlpmetrics.Exemplar
* suppress deprecation warnings for metrics
* update pdatagen generator code to support AsDouble fields
* run make genpdata
Copy file name to clipboardExpand all lines: cmd/pdatagen/internal/metrics_structs.go
+26-12Lines changed: 26 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,7 @@ var intGauge = &messageValueStruct{
143
143
vardoubleGauge=&messageValueStruct{
144
144
structName: "DoubleGauge",
145
145
description: "// DoubleGauge represents the type of a double scalar metric that always exports the \"current value\" for every data point.",
146
-
originFullName: "otlpmetrics.DoubleGauge",
146
+
originFullName: "otlpmetrics.Gauge",
147
147
fields: []baseField{
148
148
&sliceField{
149
149
fieldName: "DataPoints",
@@ -171,7 +171,7 @@ var intSum = &messageValueStruct{
171
171
vardoubleSum=&messageValueStruct{
172
172
structName: "DoubleSum",
173
173
description: "// DoubleSum represents the type of a numeric double scalar metric that is calculated as a sum of all reported measurements over a time interval.",
174
-
originFullName: "otlpmetrics.DoubleSum",
174
+
originFullName: "otlpmetrics.Sum",
175
175
fields: []baseField{
176
176
aggregationTemporalityField,
177
177
isMonotonicField,
@@ -200,7 +200,7 @@ var intHistogram = &messageValueStruct{
200
200
varhistogram=&messageValueStruct{
201
201
structName: "Histogram",
202
202
description: "// Histogram represents the type of a metric that is calculated by aggregating as a Histogram of all reported measurements over a time interval.",
203
-
originFullName: "otlpmetrics.DoubleHistogram",
203
+
originFullName: "otlpmetrics.Histogram",
204
204
fields: []baseField{
205
205
aggregationTemporalityField,
206
206
&sliceField{
@@ -214,7 +214,7 @@ var histogram = &messageValueStruct{
214
214
varsummary=&messageValueStruct{
215
215
structName: "Summary",
216
216
description: "// Summary represents the type of a metric that is calculated by aggregating as a Summary of all reported double measurements over a time interval.",
217
-
originFullName: "otlpmetrics.DoubleSummary",
217
+
originFullName: "otlpmetrics.Summary",
218
218
fields: []baseField{
219
219
&sliceField{
220
220
fieldName: "DataPoints",
@@ -250,12 +250,19 @@ var doubleDataPointSlice = &sliceOfPtrs{
250
250
vardoubleDataPoint=&messageValueStruct{
251
251
structName: "DoubleDataPoint",
252
252
description: "// DoubleDataPoint is a single data point in a timeseries that describes the time-varying value of a double metric.",
253
-
originFullName: "otlpmetrics.DoubleDataPoint",
253
+
originFullName: "otlpmetrics.NumberDataPoint",
254
254
fields: []baseField{
255
255
labelsField,
256
256
startTimeField,
257
257
timeField,
258
-
valueFloat64Field,
258
+
&primitiveAsDoubleField{
259
+
originFullName: "otlpmetrics.NumberDataPoint",
260
+
fieldName: "Value",
261
+
originFieldName: "Value",
262
+
returnType: "float64",
263
+
defaultVal: "float64(0.0)",
264
+
testVal: "float64(17.13)",
265
+
},
259
266
exemplarsField,
260
267
},
261
268
}
@@ -289,7 +296,7 @@ var histogramDataPointSlice = &sliceOfPtrs{
289
296
varhistogramDataPoint=&messageValueStruct{
290
297
structName: "HistogramDataPoint",
291
298
description: "// HistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a Histogram of values.",
0 commit comments