[doc only] Bug 1632072: Rephrase note on counter metrics

This commit is contained in:
Michael Droettboom 2020-04-27 11:26:23 -04:00
Родитель f202ed3f61
Коммит d0eccc95db
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -2,7 +2,7 @@
Used to count how often something happens, say how often a certain button was pressed. A counter always starts from `0`. Each time you record to a counter, its value is incremented.
> **IMPORTANT:** When using a counter metric, it is important to let the it do the counting. Specifically, use your own variable for counting and reset the counter yourself. It will be difficult to reset at the correct moment relative to when the counter value is sent in a ping. By just using the `counter.add` API and letting Glean handle resetting the counter when it is sent in a ping, Glean will ensure that counts aren't duplicated across pings.
> **IMPORTANT:** When using a counter metric, it is important to let the Glean metric do the counting. Using your own variable for counting and setting the counter yourself could be problematic because it will be difficult to reset the value at the exact moment that the value is sent in a ping. Instead, just use `counter.add` to increment the value and let Glean handle resetting the counter.
## Configuration