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
I'm sure the intent here was to copy the existing tag set, but maps are a reference type. The result is that the bucket tag that is added for histogram, meter, and timer metrics is also applied to counter and gauge metrics.
The correct way to handle this is to explicitly copy the existing map:
When creating tags for the purpose of bucketing histogram, meter, and timer metrics, the library improperly modifies the global tag set:
https://github.com/vrischmann/go-metrics-influxdb/blob/master/influxdb.go#L151
https://github.com/vrischmann/go-metrics-influxdb/blob/master/influxdb.go#L173
https://github.com/vrischmann/go-metrics-influxdb/blob/master/influxdb.go#L207
I'm sure the intent here was to copy the existing tag set, but maps are a reference type. The result is that the
bucket
tag that is added for histogram, meter, and timer metrics is also applied to counter and gauge metrics.The correct way to handle this is to explicitly copy the existing map:
I'll open a PR with the fix.
The text was updated successfully, but these errors were encountered: