Skip to content

Commit

Permalink
Update testbed perftest data provider to use attributes (#3848)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu authored Aug 17, 2021
1 parent e15a57a commit dd190c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testbed/testbed/data_providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ func (dp *perfTestDataProvider) GenerateMetrics() (pdata.Metrics, bool) {
dataPoint.SetStartTimestamp(pdata.TimestampFromTime(time.Now()))
value := dp.dataItemsGenerated.Inc()
dataPoint.SetIntVal(int64(value))
dataPoint.LabelsMap().InitFromMap(map[string]string{
"item_index": "item_" + strconv.Itoa(j),
"batch_index": "batch_" + strconv.Itoa(int(batchIndex)),
dataPoint.Attributes().InitFromMap(map[string]pdata.AttributeValue{
"item_index": pdata.NewAttributeValueString("item_" + strconv.Itoa(j)),
"batch_index": pdata.NewAttributeValueString("batch_" + strconv.Itoa(int(batchIndex))),
})
}
}
Expand Down

0 comments on commit dd190c5

Please sign in to comment.