ashb commented on code in PR #43340:
URL: https://github.com/apache/airflow/pull/43340#discussion_r1825890185
##########
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:
> So, I dug through the otel python source and found the following: <img
alt="image" width="516"
src="https://private-user-images.githubusercontent.com/32691630/382109888-588c6c49-f459-460b-8ac9-f8cd199c91d7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzA0NzE3ODQsIm5iZiI6MTczMDQ3MTQ4NCwicGF0aCI6Ii8zMjY5MTYzMC8zODIxMDk4ODgtNTg4YzZjNDktZjQ1OS00NjBiLThhYzktZjhjZDE5OWM5MWQ3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDExMDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMTAxVDE0MzEyNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM4ZDhmZTYxOWE3MDU0Yzk5OWIwOWJlY2Q4MDYwZGU2ZTk2N2I5N2YwMTUxMmEwOGFmOTMzNjVjMDJjYjllY2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RkiN_hbqna4PuwWGjckmZoAP_upCjm8QrTvV7dVSb8A">
So apparently, 255 characters supported.
If otel is validating the things, do we need to also validate it, or can we
simply rely on it to do the job for us and not have the complexity? (My vote is
almost always to have less code)
--
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]