Repository: apache/airflow

Issue:
Metrics documentation fixes and deprecations
**Apache Airflow version**: 2.0.2

**Kubernetes version (if you are using kubernetes)** (use `kubectl version`): N/A

**Environment**: N/A

- **Cloud provider or hardware configuration**:
- **OS** (e.g. from /etc/os-release):
- **Kernel** (e.g. `uname -a`):
- **Install tools**:
- **Others**:

**What happened**:
* `dag_processing.last_runtime.*` - In version 1.10.6 [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md#airflow-1106) it was indicated that this metrics will be removed in 2.0. It was not removed from the metrics documentation. Also the metrics documentation doesn't mention it supposed to be removed/deprecated, it's documented as a gauge but it is actually a timer (reported https://github.com/apache/airflow/issues/10091). 
* `dag_processing.processor_timeouts`: documented as a guage but it is actually a counter. Again from https://github.com/apache/airflow/issues/10091. 
* `dag_file_processor_timeouts` - indicated as supposed to be removed in 2.0, was not removed from [code](https://github.com/apache/airflow/blob/37d549/airflow/utils/dag_processing.py#L1169) but removed from docs. 
* Would be nice if documentation of 1.10.15 indicated the deprecated metrics more clearly, not only in `UPDATING.md`.

**What you expected to happen**:

* The Metrics page should document all metrics being emitted by Airflow.
* The Metrics page should correctly document the type of the metric.

**How to reproduce it**:
<!---

As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.

If you are using kubernetes, please attempt to recreate the issue using minikube or kind.

## Install minikube/kind

- Minikube https://minikube.sigs.k8s.io/docs/start/
- Kind https://kind.sigs.k8s.io/docs/user/quick-start/

If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action

You can include images using the .md style of
![alt text](http://url/to/img.png)

To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file.

--->

Check official [Metrics Docs](https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/metrics.html?highlight=metrics#)

**Anything else we need to know**:

<!--

How often does this problem occur? Once? Every time etc?

Any relevant logs to include? Put them here in side a detail tag:
<details><summary>x.log</summary> lots of stuff </details>

-->



Discussion:
- `dag_processing.last_runtime.*` has been removed from the metrics documentation in #17772
- `dag_processing.processor_timeouts` moved to counters section in #23393
- It appears dag_file_processor_timeouts is still being emitted even today, I will put up a PR for this

Resolving patch:
diff --git a/airflow/dag_processing/manager.py b/airflow/dag_processing/manager.py
--- a/airflow/dag_processing/manager.py
+++ b/airflow/dag_processing/manager.py
@@ -1144,7 +1144,7 @@ def _kill_timed_out_processors(self):
                 )
                 Stats.decr("dag_processing.processes")
                 Stats.incr("dag_processing.processor_timeouts")
-                # TODO: Remove after Airflow 2.0
+                # Deprecated; may be removed in a future Airflow release.
                 Stats.incr("dag_file_processor_timeouts")
                 processor.kill()
 


Test patch: