Skip to content

Commit

Permalink
Update events docs
Browse files Browse the repository at this point in the history
  • Loading branch information
akkomar authored and travis79 committed Sep 13, 2024
1 parent c33b53c commit 9312051
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions docs/user/reference/metrics/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Each event contains the following data:
- A timestamp, in milliseconds. The first event in any ping always has a value of `0`, and subsequent event timestamps are relative to it.
- If sending events in custom pings, see [note](../../user/pings/custom.md#the-gleanrestarted-event) on event timestamp calculation throughout restarts.
- The name of the event.
- A set of key-value pairs, where the keys are predefined in the `extra_keys` metric parameter, and the values are strings.
- A set of key-value pairs, where the keys are predefined in the `extra_keys` metric parameter. Values are one of `string`, `boolean`, `quantity`, and are converted to `string` for transmission.

{{#include ../../../shared/blockquote-info.html}}

Expand Down Expand Up @@ -382,9 +382,16 @@ A maximum of 50 extra keys is allowed.
Each extra key contains additional metadata:

- `description`: **Required.** A description of the key.
* `type`: The type of value this extra key can hold. One of `string`, `boolean`, `quantity`. Defaults to `string`.
* `type`: The type of value this extra key can hold. One of `string`, `boolean`, `quantity`. Defaults to `string`. Recorded value is converted to string for transmission.
**Note**: If not specified only the legacy API on `record` is available.

{{#include ../../../shared/blockquote-info.html}}

#### Extras or string metrics?

> When designing your metrics, define properties that are slow-changing and common across all events in a given ping as string metrics.
> Properties specific to a single event or a subset of events should be defined as event extras.

## Data questions

* When and from where was the login view opened?
Expand Down
2 changes: 1 addition & 1 deletion docs/user/user/metrics/adding-new-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ For all of the metric types in this section that measure single values, it is es

For tracking user behavior, it is usually meaningful to know the over of events that lead to the use of a feature. Therefore, for user behavior, an [event metric](../../reference/metrics/event.html) is usually the best choice.

Be aware, however, that events can be particularly expensive to transmit, store and analyze, so should not be used for higher-frequency measurements.
Be aware, however, that events can be particularly expensive to transmit, store and analyze, so should not be used for higher-frequency measurements - though this is less of a concern in [server environments](../adding-glean-to-your-project/server.md).

### Are you counting things?

Expand Down

0 comments on commit 9312051

Please sign in to comment.