Utility Functions¶
create_metric
¶
-
create_metric
(name, slug)¶ Creates a new type of metric track
Arguments¶
name
- The verbose name of the metric to track
slug
- The identifying slug used for the metric. This is what is passed into
metric()
to increment the metric
metric
¶
-
metric
(slug, num=1, **kwargs) Increment a metric by
num
Shortcut to the current backend (as set by
APP_METRICS_BACKEND
metric method.)
Note
If there is no metric mapped to slug
, a metric named Autocreated Metric
with the passed in``slug`` will be auto-generated.
Arguments¶
slug
(required)- Name of the metric to increment.
num
- Number to increment the metric by. Defaults to 1.