
**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.



tests/core/test_stats.py
"""
    This custom Statsd class is invalid because it does not subclass
    statsd.StatsClient.
    """
    incr_calls = 0
    def __init__(self, host=None, port=None, prefix=None):
        pass
    def incr(self, stat, count=1, rate=1):  
        InvalidCustomStatsd.incr_calls += 1
    @classmethod
    def _reset(cls):
        cls.incr_calls = 0
class TestStats(unittest.TestCase):
    def setUp(self):
        self.statsd_client = Mock()
        self.stats = SafeStatsdLogger(self.statsd_client)
        CustomStatsd._reset()
        InvalidCustomStatsd._reset()
    def test_increment_counter_with_valid_name(self):
        self.stats.incr('test_stats_run')
        self.statsd_client.incr.assert_called_once_with('test_stats_run', 1, 1)
    def test_stat_name_must_be_a_string(self):
        self.stats.incr([])
        self.statsd_client.assert_not_called()
    def test_stat_name_must_not_exceed_max_length(self):
        self.stats.incr('X' * 300)
        self.statsd_client.assert_not_called()
    def test_stat_name_must_only_include_allowed_characters(self):