def metric(slug, num=1, **kwargs):
    if collection_disabled():
        return

    backend = import_backend()

    try:
        backend.metric(slug, num, **kwargs)
    except Metric.DoesNotExist:
        create_metric(slug=slug, name='Autocreated Metric')
Increment a metric
dataset/ETHPy150Open frankwiles/django-app-metrics/app_metrics/utils.py/metric