potiuk commented on code in PR #56187:
URL: https://github.com/apache/airflow/pull/56187#discussion_r2569487920


##########
shared/observability/pyproject.toml:
##########
@@ -0,0 +1,70 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[project]
+name = "apache-airflow-shared-observability"
+description = "Shared observability code for Airflow distributions"
+version = "0.0"
+classifiers = [
+    "Private :: Do Not Upload",
+]
+
+dependencies = [
+    "pendulum>=3.1.0",
+    "structlog>=25.4.0",
+]
+
+[project.optional-dependencies]
+"otel" = [
+    "opentelemetry-api>=1.27.0",
+    "opentelemetry-exporter-otlp>=1.27.0",
+    "opentelemetry-proto<9999,>=1.27.0",
+]
+"statsd" = [
+    "statsd>=3.3.0",
+]
+"datadog" = [
+    "datadog>=0.50.0",
+]
+"all" = ["apache-airflow-shared-observability[otel,statsd,datadog]"]
+
+[dependency-groups]
+dev = [
+    "apache-airflow",

Review Comment:
   The goal here is to completely get rid of `apache-airflow` here - even in 
dev dependencies. This is the only way we can make the "shared" module 
standalone. If "shared" module depends on "apache-airflow" - we are completely 
cooked - we've lost the whole idea of having an independent, shared library 
that can be used in two places:
   
   * `apache-airflow-core`
   * apache-airfow-task-sdk`
   
   If the shared library - even in tests - depends on "apache-airflow", it 
means that module cannot be tested independently from `airflow-core` and 
`airflow-task-sdk` - and this is likely that somewhere we still implicitly 
depend on some of the stuff there (and I pointed a few places where we do it 
explicitly).
   
   So we absolutely should not depend here on `apache-airflow`
   
   Since we use `configuration` - we should rather depend on 
`apache-airflow-shared-configuration` and for tests import things from there.
   



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