Separate Redis instrumentation per client/instance
What does this MR do?
This is the groundwork required for a series of improvements on Redis usage visualization.
It separates the instrumentation storages for each
Redis client being used. These being, Cache
, SharedState
,
Queues
and Action Cable.
That means that these changes will make the following achievable:
- Separate Redis logs per Redis instance
- Categorize the Redis instance in Prometheus metrics
- Separate Redis performance bar data per Redis instance
In summary, here's what this MR does:
- Transforms
Gitlab::Instrumentation::Redis
into an aggregation class. It conserves most of the interface, but instead reads from all defined storages - Moves the
Gitlab::Instrumentation::RedisDriver
method definitions toGitlab::Instrumentation::RedisInterceptor
module. That's mostly a decision discussed at gitlab-com/gl-infra/scalability#353 (closed) in order to avoid duplication of concerns and still instrument written/read bytes, timings and Redis calls in a single place (also it's a requirement to access the provided@options[:instrumentation_class]
). - It instruments the Action Cable initializer to also use a separate storage (it's not being used at GitLab.com yet).
gitlab-com/gl-infra/scalability#353 (closed)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
Edited by Oswaldo Ferreira