Fix string to int conversion in eventhub consumer (#8006)
This commit is contained in:
parent
bbc2aa660d
commit
48bab9db86
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue