diff options
Diffstat (limited to 'doc/development/telemetry/usage_ping.md')
-rw-r--r-- | doc/development/telemetry/usage_ping.md | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/development/telemetry/usage_ping.md b/doc/development/telemetry/usage_ping.md index 6c432ab3d87..04206e1fae0 100644 --- a/doc/development/telemetry/usage_ping.md +++ b/doc/development/telemetry/usage_ping.md @@ -316,6 +316,10 @@ Implemented using Redis methods [PFADD](https://redis.io/commands/pfadd) and [PF Increment unique users count using Redis HLL, for given event name. + Tracking events using the `UsageData` API requires the `usage_data_api` feature flag to be enabled, which is disabled by default. + + API requests are protected by checking of a valid CSRF token. + In order to be able to increment the values the related feature `usage_data<event_name>` should be enabled. ```plaintext @@ -330,9 +334,10 @@ Implemented using Redis methods [PFADD](https://redis.io/commands/pfadd) and [PF Return 200 if tracking failed for any reason. - - `401 Unauthorized` if user is not authenticated - - `400 Bad request` if event parameter is missing - `200` if event was tracked or any errors + - `400 Bad request` if event parameter is missing + - `401 Unauthorized` if user is not authenticated + - `403 Forbidden` for invalid CSRF token provided 1. Track event using base module `Gitlab::UsageDataCounters::HLLRedisCounter.track_event(entity_id, event_name)`. |