Skip to content

Add Basic Redis HLL module

Alina Mihaila requested to merge 235697-add-basic-redis-hll-class-2 into master

More context here #232831 (closed)

What does this MR do?

Add a module for tracking events unsing Redis HLL Gitlab::UsageDataCounters::HLLRedisCounter

With this MR

Example of usage:

Track expand_vulnerabilities event using Redis HLL

Keep in mind to add a feature flag per event with user actor for percentage rollout

# Define the event in known_events.yml
- name: expand_vulnerabilities
  category: vulnerabilities
  aggregation: daily

# Tracking event
Gitlab::UsageDataCounters::HLLRedisCounter.track_event(visitor_id, 'expand_vulnerabilities')

# Get event data
Gitlab::UsageDataCounters::HLLRedisCounter.unique_events(event_names: 'expand_vulnerabilities', start_date: start_date, end_date: end_date)

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related #235697 (closed)

Edited by Alina Mihaila

Merge request reports