Skip to content

Commit

Permalink
Fix string to int conversion in eventhub consumer (influxdata#8006)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek-sumo authored and idohalevi committed Sep 23, 2020
1 parent b8eae22 commit 50836ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/inputs/eventhub_consumer/eventhub_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ func (e *EventHub) createMetrics(event *eventhub.Event) ([]telegraf.Metric, erro
}

if event.SystemProperties.PartitionID != nil && e.PartitionIDTag != "" {
metrics[i].AddTag(e.PartitionIDTag, string(*event.SystemProperties.PartitionID))
metrics[i].AddTag(e.PartitionIDTag, fmt.Sprintf("%d", *event.SystemProperties.PartitionID))
}
if event.SystemProperties.PartitionKey != nil && e.PartitionKeyTag != "" {
metrics[i].AddTag(e.PartitionKeyTag, *event.SystemProperties.PartitionKey)
Expand Down

0 comments on commit 50836ed

Please sign in to comment.