ferruzzi commented on code in PR #43340:
URL: https://github.com/apache/airflow/pull/43340#discussion_r1842892618
##########
airflow/metrics/validators.py:
##########
@@ -155,26 +155,11 @@ def stat_name_otel_handler(
if not (isinstance(stat_name, str) and isinstance(stat_prefix, str)):
raise InvalidStatsNameException("Stat name and prefix must both be
strings.")
- if len(proposed_stat_name) > OTEL_NAME_MAX_LENGTH:
- # If the name is in the exceptions list, do not fail it for being too
long.
- # It may still be deemed invalid for other reasons below.
- for exemption in BACK_COMPAT_METRIC_NAMES:
Review Comment:
My IDE is currently borked so ik can't double check this easily; is
BACK_COMPAT_METRIC_NAMES used anywhere else? It's possible that can also be
pruned out now if it was only ever used as a work-around for the name length
bug.
##########
airflow/metrics/validators.py:
##########
@@ -155,26 +155,11 @@ def stat_name_otel_handler(
if not (isinstance(stat_name, str) and isinstance(stat_prefix, str)):
raise InvalidStatsNameException("Stat name and prefix must both be
strings.")
- if len(proposed_stat_name) > OTEL_NAME_MAX_LENGTH:
- # If the name is in the exceptions list, do not fail it for being too
long.
- # It may still be deemed invalid for other reasons below.
- for exemption in BACK_COMPAT_METRIC_NAMES:
Review Comment:
My IDE is currently borked so I can't double check this easily; is
BACK_COMPAT_METRIC_NAMES used anywhere else? It's possible that can also be
pruned out now if it was only ever used as a work-around for the name length
bug.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]