Skip to content

Commit 7811e4e

Browse files
authored
fix: use bucket stop as timestamp for metrics bucket (#9327)
This fixes a problem where the yggdrasil-engine does not send the correct value for bucket.start. In practice clients sends metrics every 60s and it does not matter if we use start or the stop timestamp to resolve the nearest full hour.
1 parent 1bb2756 commit 7811e4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/features/metrics/client-metrics/metrics-service-v2.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export default class ClientMetricsServiceV2 {
210210
featureName: name,
211211
appName: value.appName,
212212
environment: value.environment ?? 'default',
213-
timestamp: value.bucket.start, //we might need to approximate between start/stop...
213+
timestamp: value.bucket.stop, //we might need to approximate between start/stop...
214214
yes: value.bucket.toggles[name].yes ?? 0,
215215
no: value.bucket.toggles[name].no ?? 0,
216216
variants: value.bucket.toggles[name].variants,

0 commit comments

Comments
 (0)