def METHOD_NAME() -> None:
    from sentry import tsdb
    from sentry.tsdb.base import TSDBModel
    while True:
        key, instance, tags, amount, sample_rate = q.get()
        amount = _sampled_value(amount, sample_rate)
        if instance:
            full_key = f"{key}.{instance}"
        else:
            full_key = key
        try:
            tsdb.incr(TSDBModel.internal, full_key, count=amount)
        except Exception:
            logger = logging.getLogger("sentry.errors")
            logger.exception("Unable to incr internal metric")
        finally:
            q.task_done()