vincbeck commented on code in PR #31725:
URL: https://github.com/apache/airflow/pull/31725#discussion_r1222005214
##########
airflow/metrics/otel_logger.py:
##########
@@ -154,9 +200,20 @@ def gauge(
delta: bool = False,
*,
tags: Attributes = None,
+ back_compat_name: str = "",
) -> None:
- warnings.warn("OpenTelemetry Gauges are not yet implemented.")
- return None
+ if rate < 0:
+ raise ValueError("rate must be a positive value.")
+ if rate < 1 and random.random() > rate:
Review Comment:
Oh I see! Oh that should be enough to me
##########
airflow/metrics/otel_logger.py:
##########
@@ -154,9 +200,20 @@ def gauge(
delta: bool = False,
*,
tags: Attributes = None,
+ back_compat_name: str = "",
) -> None:
- warnings.warn("OpenTelemetry Gauges are not yet implemented.")
- return None
+ if rate < 0:
+ raise ValueError("rate must be a positive value.")
+ if rate < 1 and random.random() > rate:
Review Comment:
Oh I see! That should be enough to me
--
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]