Commit 523333da authored by Amy Qualls's avatar Amy Qualls

Merge branch 'am-update-usage-ping-guide' into 'master'

Update Usage Ping guide

See merge request gitlab-org/gitlab!58756
parents 38186b3c e68f6c96
......@@ -497,6 +497,7 @@ Implemented using Redis methods [PFADD](https://redis.io/commands/pfadd) and [PF
redis_slot: compliance
expiry: 42 # 6 weeks
aggregation: weekly
feature_flag: usage_data_i_compliance_credential_inventory
```
Keys:
......@@ -528,7 +529,7 @@ Implemented using Redis methods [PFADD](https://redis.io/commands/pfadd) and [PF
aggregation.
- `aggregation`: may be set to a `:daily` or `:weekly` key. Defines how counting data is stored in Redis.
Aggregation on a `daily` basis does not pull more fine grained data.
- `feature_flag`: optional `default_enabled: :yaml`. If no feature flag is set then the tracking is enabled. For details, see our [GitLab internal Feature flags](../feature_flags/index.md) documentation. The feature flags are owned by the group adding the event tracking.
- `feature_flag`: optional `default_enabled: :yaml`. If no feature flag is set then the tracking is enabled. One feature flag can be used for multiple events. For details, see our [GitLab internal Feature flags](../feature_flags/index.md) documentation. The feature flags are owned by the group adding the event tracking.
Use one of the following methods to track events:
......@@ -567,8 +568,6 @@ Use one of the following methods to track events:
1. Track event in API using `increment_unique_values(event_name, values)` helper method.
To be able to track the event, Usage Ping must be enabled and the event feature `usage_data_<event_name>` must be enabled.
Arguments:
- `event_name`: event name.
......@@ -612,10 +611,6 @@ Use one of the following methods to track events:
API requests are protected by checking for a valid CSRF token.
To increment the values, the related feature `usage_data_<event_name>` should be
set to `default_enabled: true`. For more information, see
[Feature flags in development of GitLab](../feature_flags/index.md).
```plaintext
POST /usage_data/increment_unique_users
```
......@@ -640,8 +635,6 @@ Use one of the following methods to track events:
Usage Data API is behind `usage_data_api` feature flag which, as of GitLab 13.7, is
now set to `default_enabled: true`.
Each event tracked using Usage Data API is behind a feature flag `usage_data_#{event_name}` which should be `default_enabled: true`
```javascript
import api from '~/api';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment