
**Apache Airflow version**:
2.0.0

**Environment**:

- **OS** (e.g. from /etc/os-release): Ubuntu 20.04 LTS
- **Python version**: 3.8
- **Kernel** (e.g. `uname -a`): x86_64 x86_64 x86_64 GNU/Linux 5.4.0-58-generic #64-Ubuntu
- **Install tools**: pip


**What happened**:

Airflow 2.0 does not send metrics to statsD.

I configure Airflow with official documentation (https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/metrics.html) and by this article https://dstan.medium.com/run-airflow-statsd-grafana-locally-16b372c86524 (but I used port 8125). 

I turned on statsD:

```ini
statsd_on = True
statsd_host = localhost
statsd_port = 8125
statsd_prefix = airflow
```

But I do not see airflow metrics at http://localhost:9102/metrics (statsD metrics endpoint).

---

P.S. I noticed this error just using Airflow 2.0. In version 1.10.13 everything is ok in the same environment.

Thank you for advance.



airflow/stats.py
"""This class is only used for TypeChecking (for IDEs, mypy, pylint, etc)"""
    @classmethod
    def incr(cls, stat: str, count: int = 1, rate: int = 1) -> None:
        """Increment stat"""
    @classmethod
    def decr(cls, stat: str, count: int = 1, rate: int = 1) -> None:
        """Decrement stat"""
    @classmethod
    def gauge(cls, stat: str, value: float, rate: int = 1, delta: bool = False) -> None:
        """Gauge stat"""
    @classmethod
    def timing(cls, stat: str, dt) -> None:
        """Stats timing"""
    @classmethod
    def timer(cls, *args, **kwargs) -> TimerProtocol:
        """Timer metric that can be cancelled"""
class Timer:
    """
    Timer that records duration, and optional sends to statsd backend.
    This class lets us have an accurate timer with the logic in one place (so
    that we don't use datetime math for duration -- it is error prone).
    Example usage:
    .. code-block:: python
        with Stats.timer() as t:
            # Something to time
            frob_the_foos()
        log.info("Frobbing the foos took %.2f", t.duration)