Metrics Improvement Project - bootstrap metrics registry#43618
Metrics Improvement Project - bootstrap metrics registry#43618dannyl1u wants to merge 5 commits intoapache:mainfrom
Conversation
ferruzzi
left a comment
There was a problem hiding this comment.
Your method for finding them looks right to me, and the next steps you laid out sound good. Left a formatting suggestion to look into.
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
There was a problem hiding this comment.
What do you think about using sections to organize the registry? I think YAML calls them nested levels. For example:
asset:
- name: updates
type: counter
description: ""
dag_processing:
- name: manager_stalls
type: counter
description: ""
- name: other_callback_count
type: counter
description: ""
... etc...
Maybe experiment with that and with what the code to process it would look like before we commit to a flat structure like this? We have a bunch of .yml files int he codebase you can look at for inspiration and to see how they are parsed in code.
There was a problem hiding this comment.
I agree it looks neater that way but my rational for the flat structure is that the metrics docs is a flat list, so we save some parsing/de-parsing by having a flat structure.
Let me know what you think
There was a problem hiding this comment.
Also if we sort it alphabetically, the registry will be naturally "organized" into the respective groups as well
There was a problem hiding this comment.
You make some good points. I can see it working both ways, let's see if anyone else has an opinion. Many people won't review a PR which is marked as a "draft" assuming it's still early WIP, so you might want to drop a message on Slack asking for thoughts.
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
|
still blocked waiting for #43340 |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
Metrics Improvement Project: #42881
After #43340 is merged, we can check in the
get_namefunction that themetric_nameexists in the metrics-registry.yaml file, and throw an error if it doesn't. This will enforce that themetrics-registry.yamlexists as a single source of truth for all metrics names. The metrics names from https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/metrics.html# will be generated from themetrics-registry.yamlfile, ensuring that the documentation for metrics names is always up-to-date.The following bash script was used to grep all metric names from the codebase, excluding files ignored by git and tests.
TODOs:
metrics-registry.yamlwith documentation to ensure no metrics were missed during the initial grep^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.