Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package 
python-opentelemetry-instrumentation-fastapi for openSUSE:Factory checked in at 
2026-07-21 22:55:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing 
/work/SRC/openSUSE:Factory/python-opentelemetry-instrumentation-fastapi (Old)
 and      
/work/SRC/openSUSE:Factory/.python-opentelemetry-instrumentation-fastapi.new.24530
 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-opentelemetry-instrumentation-fastapi"

Tue Jul 21 22:55:51 2026 rev:12 rq:1365763 version:0.64b0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-opentelemetry-instrumentation-fastapi/python-opentelemetry-instrumentation-fastapi.changes
        2026-06-27 18:05:31.146805713 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-opentelemetry-instrumentation-fastapi.new.24530/python-opentelemetry-instrumentation-fastapi.changes
     2026-07-21 22:58:18.101420665 +0200
@@ -1,0 +2,44 @@
+Tue Jul  7 19:03:18 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 0.64b0:
+  * ### Added
+  * `opentelemetry-instrumentation-exceptions`: add
+    instrumentation to emit OpenTelemetry logs for uncaught
+    process, thread, and asyncio exceptions.
+  * `opentelemetry-instrumentation-botocore`: loosen aiobotocore
+    version constraints to allow for 3.x
+  * `opentelemetry-instrumentation-logging`: add optional
+    `inject_trace_context` argument for injecting trace context
+    attributes
+  * `opentelemetry-instrumentation-redis`: gracefully handle hook
+    exceptions
+  * ### Changed
+  * opentelemetry-instrumentation-requests: remove multiple calls
+    to sanitize_method
+  * ### Fixed
+  * `opentelemetry-instrumentation-django`: Remove duplicate
+    query logging in SQLCommenter middleware that broke Django's
+    `assertNumQueries`
+  * `opentelemetry-instrumentation-flask`: wrap wsgi_app call in
+    try/except to prevent active_requests gauge leak
+  * `opentelemetry-instrumentation-asyncpg`: instrument prepared
+    statements
+  * `opentelemetry-instrumentation-aiokafka`, `opentelemetry-
+    instrumentation-confluent-kafka`, `opentelemetry-
+    instrumentation-kafka-python`: fix malformed RST formatting
+    in module docstrings
+  * `opentelemetry-instrumentation-dbapi`: Fix pyodbc DB-API
+    instrumentation examples to wrap `connect`.
+  * `opentelemetry-instrumentation-tornado`: reduce cardinality
+    of `http.target` metrics attribute with old semantic
+    conventions
+  * `opentelemetry-instrumentation-dbapi`: implement proper
+    handling of t-string queries
+  * `opentelemetry-instrumentation-fastapi`: fix `AttributeError`
+    when resolving routes added via `include_router` on FastAPI
+    0.137+
+  * `opentelemetry-instrumentation-tornado`: sanitize the request
+    http method in server and client spans and metrics
+- drop support-fastapi-0.137.patch (upstream)
+
+-------------------------------------------------------------------

Old:
----
  opentelemetry_instrumentation_fastapi-0.63b1.tar.gz
  support-fastapi-0.137.patch

New:
----
  opentelemetry_instrumentation_fastapi-0.64b0.tar.gz

----------(Old B)----------
  Old:    http method in server and client spans and metrics
- drop support-fastapi-0.137.patch (upstream)
----------(Old E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-opentelemetry-instrumentation-fastapi.spec ++++++
--- /var/tmp/diff_new_pack.yePNo9/_old  2026-07-21 22:58:20.517502997 +0200
+++ /var/tmp/diff_new_pack.yePNo9/_new  2026-07-21 22:58:20.521503133 +0200
@@ -27,14 +27,12 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-opentelemetry-instrumentation-fastapi%{?psuffix}
-Version:        0.63b1
+Version:        0.64b0
 Release:        0
 Summary:        OpenTelemetry FastAPI Instrumentation
 License:        Apache-2.0
 URL:            
https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-fastapi
 Source:         
https://files.pythonhosted.org/packages/source/o/opentelemetry_instrumentation_fastapi/opentelemetry_instrumentation_fastapi-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM Based on 
gh#open-telemetry/opentelemetry-python-contrib#4700
-Patch0:         support-fastapi-0.137.patch
 BuildRequires:  %{python_module base >= 3.10}
 BuildRequires:  %{python_module hatchling}
 BuildRequires:  %{python_module pip}

++++++ opentelemetry_instrumentation_fastapi-0.63b1.tar.gz -> 
opentelemetry_instrumentation_fastapi-0.64b0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_instrumentation_fastapi-0.63b1/PKG-INFO 
new/opentelemetry_instrumentation_fastapi-0.64b0/PKG-INFO
--- old/opentelemetry_instrumentation_fastapi-0.63b1/PKG-INFO   2020-02-02 
01:00:00.000000000 +0100
+++ new/opentelemetry_instrumentation_fastapi-0.64b0/PKG-INFO   2020-02-02 
01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: opentelemetry-instrumentation-fastapi
-Version: 0.63b1
+Version: 0.64b0
 Summary: OpenTelemetry FastAPI Instrumentation
 Project-URL: Homepage, 
https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-fastapi
 Project-URL: Repository, 
https://github.com/open-telemetry/opentelemetry-python-contrib
@@ -19,10 +19,10 @@
 Classifier: Programming Language :: Python :: 3.14
 Requires-Python: >=3.10
 Requires-Dist: opentelemetry-api~=1.12
-Requires-Dist: opentelemetry-instrumentation-asgi==0.63b1
-Requires-Dist: opentelemetry-instrumentation==0.63b1
-Requires-Dist: opentelemetry-semantic-conventions==0.63b1
-Requires-Dist: opentelemetry-util-http==0.63b1
+Requires-Dist: opentelemetry-instrumentation-asgi==0.64b0
+Requires-Dist: opentelemetry-instrumentation==0.64b0
+Requires-Dist: opentelemetry-semantic-conventions==0.64b0
+Requires-Dist: opentelemetry-util-http==0.64b0
 Provides-Extra: instruments
 Requires-Dist: fastapi~=0.92; extra == 'instruments'
 Description-Content-Type: text/x-rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_instrumentation_fastapi-0.63b1/pyproject.toml 
new/opentelemetry_instrumentation_fastapi-0.64b0/pyproject.toml
--- old/opentelemetry_instrumentation_fastapi-0.63b1/pyproject.toml     
2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_instrumentation_fastapi-0.64b0/pyproject.toml     
2020-02-02 01:00:00.000000000 +0100
@@ -26,10 +26,10 @@
 ]
 dependencies = [
   "opentelemetry-api ~= 1.12",
-  "opentelemetry-instrumentation == 0.63b1",
-  "opentelemetry-instrumentation-asgi == 0.63b1",
-  "opentelemetry-semantic-conventions == 0.63b1",
-  "opentelemetry-util-http == 0.63b1",
+  "opentelemetry-instrumentation == 0.64b0",
+  "opentelemetry-instrumentation-asgi == 0.64b0",
+  "opentelemetry-semantic-conventions == 0.64b0",
+  "opentelemetry-util-http == 0.64b0",
 ]
 
 [project.optional-dependencies]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_instrumentation_fastapi-0.63b1/src/opentelemetry/instrumentation/fastapi/__init__.py
 
new/opentelemetry_instrumentation_fastapi-0.64b0/src/opentelemetry/instrumentation/fastapi/__init__.py
--- 
old/opentelemetry_instrumentation_fastapi-0.63b1/src/opentelemetry/instrumentation/fastapi/__init__.py
      2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_instrumentation_fastapi-0.64b0/src/opentelemetry/instrumentation/fastapi/__init__.py
      2020-02-02 01:00:00.000000000 +0100
@@ -184,6 +184,14 @@
 from starlette.routing import Match, Route
 from starlette.types import ASGIApp, Receive, Scope, Send
 
+try:
+    # FastAPI >= 0.137.2 exposes a public helper that flattens routes added via
+    # include_router() (nested under _IncludedRouter in 0.137) into matchable
+    # RouteContext objects. Older versions don't have it; see _flatten_routes.
+    from fastapi.routing import iter_route_contexts
+except ImportError:
+    iter_route_contexts = None
+
 from opentelemetry.instrumentation._semconv import (
     _get_schema_url,
     _OpenTelemetrySemanticConventionStability,
@@ -462,6 +470,30 @@
         _InstrumentedFastAPI._instrumented_fastapi_apps.add(self)
 
 
+def _flatten_routes(routes):
+    """
+    Yield the matchable routes from an app's route list.
+
+    FastAPI 0.137 nests routes added via include_router() under _IncludedRouter
+    tree nodes, which expose no ``path`` attribute. They have to be flattened
+    into their effective route contexts (each providing matches() and the full
+    templated path) before they can be matched against a scope.
+
+    FastAPI >= 0.137.2 provides the public iter_route_contexts() for this, 
which
+    also wraps plain routes uniformly. On older versions fall back to the
+    private _IncludedRouter.effective_route_contexts(), and on FastAPI < 0.137
+    (no _IncludedRouter) the routes are already matchable as-is.
+    """
+    if iter_route_contexts is not None:
+        yield from iter_route_contexts(routes)
+        return
+    for starlette_route in routes:
+        if hasattr(starlette_route, "effective_route_contexts"):
+            yield from starlette_route.effective_route_contexts()
+        else:
+            yield starlette_route
+
+
 def _get_route_details(scope):
     """
     Function to retrieve Starlette route from scope.
@@ -478,7 +510,7 @@
     app = scope["app"]
     route = None
 
-    for starlette_route in app.routes:
+    for starlette_route in _flatten_routes(app.routes):
         match, _ = (
             Route.matches(starlette_route, scope)
             if isinstance(starlette_route, Route)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_instrumentation_fastapi-0.63b1/src/opentelemetry/instrumentation/fastapi/version.py
 
new/opentelemetry_instrumentation_fastapi-0.64b0/src/opentelemetry/instrumentation/fastapi/version.py
--- 
old/opentelemetry_instrumentation_fastapi-0.63b1/src/opentelemetry/instrumentation/fastapi/version.py
       2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_instrumentation_fastapi-0.64b0/src/opentelemetry/instrumentation/fastapi/version.py
       2020-02-02 01:00:00.000000000 +0100
@@ -1,4 +1,4 @@
 # Copyright The OpenTelemetry Authors
 # SPDX-License-Identifier: Apache-2.0
 
-__version__ = "0.63b1"
+__version__ = "0.64b0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_instrumentation_fastapi-0.63b1/tests/test_fastapi_instrumentation.py
 
new/opentelemetry_instrumentation_fastapi-0.64b0/tests/test_fastapi_instrumentation.py
--- 
old/opentelemetry_instrumentation_fastapi-0.63b1/tests/test_fastapi_instrumentation.py
      2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_instrumentation_fastapi-0.64b0/tests/test_fastapi_instrumentation.py
      2020-02-02 01:00:00.000000000 +0100
@@ -358,6 +358,39 @@
                 span.attributes[HTTP_URL],
             )
 
+    def test_included_router_route_details(self):
+        """
+        Regression test for
+        
https://github.com/open-telemetry/opentelemetry-python-contrib/issues/4699
+
+        FastAPI 0.137 added intermediate ``_IncludedRouter`` objects to
+        ``app.routes`` that do not expose a ``path`` attribute. Resolving the
+        route details for a request to an ``include_router``-added route must
+        not raise ``AttributeError`` and must still report the templated route.
+        """
+        app = fastapi.FastAPI()
+        router = fastapi.APIRouter()
+
+        @router.get("/items/{item_id}")
+        async def _read_item(item_id: str):
+            return {"item_id": item_id}
+
+        app.include_router(router, prefix="/api")
+        self._instrumentor.instrument_app(app)
+        try:
+            client = TestClient(app)
+            resp = client.get("/api/items/123")
+            self.assertEqual(200, resp.status_code)
+            spans = self.memory_exporter.get_finished_spans()
+            self.assertTrue(spans)
+            server_span = spans[-1]
+            self.assertEqual(
+                "/api/items/{item_id}", server_span.attributes[HTTP_ROUTE]
+            )
+            self.assertIn("GET /api/items/{item_id}", server_span.name)
+        finally:
+            self._instrumentor.uninstrument_app(app)
+
     def test_host_fastapi_call(self):
         client = TestClient(self._app, base_url="https://testserver2:443";)
         client.get("/")

Reply via email to