Skip to content

Commit

Permalink
chore: add environment_id label to evaluation event metrics (#1391)
Browse files Browse the repository at this point in the history
Signed-off-by: Kenta Kozuka <kenta.kozuka@gmail.com>
  • Loading branch information
kentakozuka authored Dec 19, 2024
1 parent 1764266 commit ffe8c83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,13 @@ func (p *evaluationCountEventPersister) incrementEvaluationCount(
)
return err
}
evaluationEventCounter.WithLabelValues(e.SdkVersion, e.FeatureId, e.Metadata[appVersion], e.VariationId).Inc()
evaluationEventCounter.WithLabelValues(
environmentId,
e.SdkVersion,
e.FeatureId,
e.Metadata[appVersion],
e.VariationId,
).Inc()
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/subscriber/processor/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ var (
Subsystem: "subscriber",
Name: "evaluation_event_total",
Help: "Total number of evaluation events",
}, []string{"sdk_version", "feature_id", "app_version", "variation_id"})
}, []string{"environment_id", "sdk_version", "feature_id", "app_version", "variation_id"})
)

func registerMetrics(r metrics.Registerer) {
Expand Down

0 comments on commit ffe8c83

Please sign in to comment.