Skip to content

Simplify Service Ping Context

Piotr Skorupa requested to merge 411607-simplify-service-ping-context into master

What does this MR do and why?

Related to #411607 (closed).

This MR removes key_path attribute from ServicePingContext for Redis metrics and instead includes the metric's Redis key in the event_name attribute. Redis and Redis HLL metric contexts are now only differentiated by the data_source attribute.

To help fetch the Redis key, which is built by logic in the RedisMetric class, I added a helper method Gitlab::Usage::MetricDefinition#to_context which takes the old key_path argument and returns a ServicePingContext object with the Redis key preassigned.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Piotr Skorupa

Merge request reports