aaron-y-chen commented on code in PR #66805:
URL: https://github.com/apache/airflow/pull/66805#discussion_r3733064168


##########
shared/observability/src/airflow_shared/observability/metrics/otel_logger.py:
##########
@@ -507,16 +512,21 @@ def get_otel_logger(
     except (ImportError, AttributeError):
         pass
 
+    # Order matters: OTel applies views in sequence, so the name-pattern views
+    # must follow the instrument-type baseline to override it for matching 
names.
+    histogram_views: list[View] = [
+        View(
+            instrument_type=metrics.Histogram,
+            aggregation=ExponentialBucketHistogramAggregation(),
+        ),
+        *build_views_for_patterns(),
+    ]

Review Comment:
   It seems OTel applies every matching view independently, there's no 
later-overrides-earlier.
   
   A `*_count` instrument matches both the baseline and its pattern view, so it 
silently exports two same-named streams, one exponential and one explicit. I 
don't think it's working as expected, right?



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