
**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
self.stats.incr('stats_one')
        self.statsd_client.incr.assert_called_once_with('stats_one', 1, 1)
    def test_increment_counter_with_allowed_prefix(self):
        self.stats.incr('stats_two.bla')
        self.statsd_client.incr.assert_called_once_with('stats_two.bla', 1, 1)
    def test_not_increment_counter_if_not_allowed(self):
        self.stats.incr('stats_three')
        self.statsd_client.assert_not_called()
class TestDogStatsWithAllowList(unittest.TestCase):
    def setUp(self):
        self.dogstatsd_client = Mock()
        self.dogstats = SafeDogStatsdLogger(self.dogstatsd_client, AllowListValidator("stats_one, stats_two"))
    def test_increment_counter_with_allowed_key(self):
        self.dogstats.incr('stats_one')
        self.dogstatsd_client.increment.assert_called_once_with(
            metric='stats_one', sample_rate=1, tags=[], value=1
        )
    def test_increment_counter_with_allowed_prefix(self):
        self.dogstats.incr('stats_two.bla')
        self.dogstatsd_client.increment.assert_called_once_with(
            metric='stats_two.bla', sample_rate=1, tags=[], value=1
        )
    def test_not_increment_counter_if_not_allowed(self):
        self.dogstats.incr('stats_three')
        self.dogstatsd_client.assert_not_called()
def always_invalid(stat_name):
    raise InvalidStatsNameException(f"Invalid name: {stat_name}")
def always_valid(stat_name):
    return stat_name
class TestCustomStatsName(unittest.TestCase):