Skip to content

Commit

Permalink
fix: pointer receiver on a copied struct (#83)
Browse files Browse the repository at this point in the history
Discrepancies between the function returning the Stats struct and the
Metrics() function

Signed-off-by: Eliott Bouhana <[email protected]>
  • Loading branch information
eliottness authored Mar 13, 2024
1 parent 405eb7a commit d64577c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
)

// Metrics transform the stats returned by the WAF into a map of key value metrics for datadog backend
func (stats *Stats) Metrics() map[string]any {
func (stats Stats) Metrics() map[string]any {
tags := make(map[string]any, len(stats.Timers)+len(stats.Truncations)+1)
for k, v := range stats.Timers {
tags[k] = uint64(v.Microseconds())
Expand Down

0 comments on commit d64577c

Please sign in to comment.