ferruzzi commented on code in PR #43340: URL: https://github.com/apache/airflow/pull/43340#discussion_r1825091847
########## airflow/metrics/otel_logger.py: ########## @@ -300,6 +305,15 @@ def timer( """Timer context manager returns the duration and can be cancelled.""" return _OtelTimer(self, stat, tags) + def get_name(self, metric_name: str, tags: Attributes | None = None) -> str: Review Comment: The TLDR on this PR is that StatsD emits metrics as something like `local_task_job.task_exit.<job_id>.<dag_id>.<task_id>.<return_code>` and doesn't support tags but OTel emits it as `local_task_job.task_exit` with a name length limit of (32??) characters but allows a tags dict for the rest, so rather than emitting everything twice, which is done in a bunch of places in the code, this change should allow metrics to be emitted once and whatever metrics backend the user uses can assemble the name (or not) as it needs. Once this is done and merged, Arshia can go through and remove the duplicates and clean the code up a bit. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org