Skip to content

Add instrumentation for MAU visiting environments pages

What does this MR do and why?

This adds a new instrumentation to count MAU users visiting a project environments pages (i.e. all /-/environments/* paths).

We use a Redis HLL counter to count unique visits to the following actions in the Projects::EnvironmentsController:

  • index
  • folder
  • show
  • new
  • edit
  • create
  • update
  • stop
  • cancel_auto_stop
  • terminal

And ProductAnalyticsTracking is used instead of RedisTracking because the use of track_redis_hll_event directly is deprecated in favour of using track_event instead.

Resolves #355690 (closed).

How to set up and validate locally

  1. Generate a service ping payload from Admin > Settings > Metrics and Profiling > Preview Payload
  2. Notice the new users_visiting_environments_pages_monthly key.

MR acceptance checklist

Edited by Ahmed Hemdan

Merge request reports