Skip to content

Commit 422f45b

Browse files
authored
fix: error gathering metrics, metric was collected before with the same name and label values (#5900)
# Description Renaming remaining dot (.) notated metrics ## Security - [x] The code changed/added as part of this pull request won't create any security issues with how the software is being used.
1 parent 05a926d commit 422f45b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

processor/internal/transformer/destination_transformer/destination_transformer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ func (d *Client) transform(ctx context.Context, clientEvents []types.Transformer
218218
}
219219
}
220220

221-
d.stat.NewStat("processor.transformer_sent", stats.CountType).Count(len(clientEvents))
222-
d.stat.NewStat("processor.transformer_received", stats.CountType).Count(len(outClientEvents))
221+
d.stat.NewStat("processor_transformer_sent", stats.CountType).Count(len(clientEvents))
222+
d.stat.NewStat("processor_transformer_received", stats.CountType).Count(len(outClientEvents))
223223

224224
return types.Response{
225225
Events: outClientEvents,

processor/internal/transformer/trackingplan_validation/trackingplan_validation.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ func (t *Client) Validate(ctx context.Context, clientEvents []types.TransformerE
139139
}
140140
}
141141

142-
t.stat.NewStat("processor.transformer_sent", stats.CountType).Count(len(clientEvents))
143-
t.stat.NewStat("processor.transformer_received", stats.CountType).Count(len(outClientEvents))
142+
t.stat.NewStat("processor_transformer_sent", stats.CountType).Count(len(clientEvents))
143+
t.stat.NewStat("processor_transformer_received", stats.CountType).Count(len(outClientEvents))
144144

145145
return types.Response{
146146
Events: outClientEvents,

processor/internal/transformer/user_transformer/user_transformer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ func (u *Client) sendBatch(ctx context.Context, url string, labels types.Transfo
213213
panic(err)
214214
}
215215
if statusCode == transformerutils.StatusCPDown {
216-
u.stat.NewStat("processor.control_plane_down", stats.GaugeType).Gauge(1)
216+
u.stat.NewStat("processor_control_plane_down", stats.GaugeType).Gauge(1)
217217
return fmt.Errorf("control plane not reachable")
218218
}
219-
u.stat.NewStat("processor.control_plane_down", stats.GaugeType).Gauge(0)
219+
u.stat.NewStat("processor_control_plane_down", stats.GaugeType).Gauge(0)
220220
return nil
221221
},
222222
endlessBackoff,

0 commit comments

Comments
 (0)