ferruzzi commented on code in PR #31725:
URL: https://github.com/apache/airflow/pull/31725#discussion_r1222002188


##########
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:
   Just noticed I missed the docstring for this method.   I'll add that in;  
it'll be the same as the incr() and decr() ones.   Do you think it needs more 
explanation than I have in those?  I can update them all while I'm at it (and 
fix the typo in those ones)



-- 
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]

Reply via email to