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 
2025-11-26 17:18:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing 
/work/SRC/openSUSE:Factory/python-opentelemetry-instrumentation-fastapi (Old)
 and      
/work/SRC/openSUSE:Factory/.python-opentelemetry-instrumentation-fastapi.new.14147
 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-opentelemetry-instrumentation-fastapi"

Wed Nov 26 17:18:41 2025 rev:6 rq:1320150 version:0.59b0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-opentelemetry-instrumentation-fastapi/python-opentelemetry-instrumentation-fastapi.changes
        2025-09-23 16:07:40.352552585 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-opentelemetry-instrumentation-fastapi.new.14147/python-opentelemetry-instrumentation-fastapi.changes
     2025-11-26 17:18:55.347012692 +0100
@@ -1,0 +2,31 @@
+Tue Nov 25 13:45:26 UTC 2025 - Nico Krapp <[email protected]>
+
+- skip broken test because our fastapi is too new
+
+-------------------------------------------------------------------
+Thu Nov 20 13:56:15 UTC 2025 - Nico Krapp <[email protected]>
+
+- Update to 0.59b0
+  * opentelemetry-instrumentation-flask: Do not record http.server.duration
+    metrics for excluded URLs.
+  * opentelemetry-instrumentation-botocore: migrate off the deprecated events
+    API to use the logs API
+  * opentelemetry-instrumentation-dbapi: fix crash retrieving libpq version
+    when enabling commenter with psycopg
+  * opentelemetry-instrumentation-fastapi: Fix handling of APIRoute subclasses
+  * opentelemetry-instrumentation-botocore: Add support for AWS Secrets Manager
+    semantic convention attribute
+  * opentelemetry-instrumentation-dbapi: Add support for commenter_options in
+    trace_integration function to control SQLCommenter behavior
+  * Add rstcheck to pre-commit to stop introducing invalid RST
+  * opentelemetry-exporter-credential-provider-gcp: create this package which
+    provides support for supplying your machine's Application Default 
Credentials
+    
(https://cloud.google.com/docs/authentication/application-default-credentials)
+    to the OTLP Exporters created automatically by OpenTelemetry Python's auto
+    instrumentation. These credentials authorize OTLP traces to be sent to
+    telemetry.googleapis.com.
+  * opentelemetry-instrumentation-psycopg: Add missing parameter
+    capture_parameters to instrumentor.
+  * opentelemetry-instrumentation-dbapi: Adds sqlcommenter to documentation.
+
+-------------------------------------------------------------------

Old:
----
  opentelemetry_instrumentation_fastapi-0.58b0.tar.gz

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

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

Other differences:
------------------
++++++ python-opentelemetry-instrumentation-fastapi.spec ++++++
--- /var/tmp/diff_new_pack.M6dkDa/_old  2025-11-26 17:18:56.207048974 +0100
+++ /var/tmp/diff_new_pack.M6dkDa/_new  2025-11-26 17:18:56.211049143 +0100
@@ -27,7 +27,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-opentelemetry-instrumentation-fastapi%{?psuffix}
-Version:        0.58b0
+Version:        0.59b0
 Release:        0
 Summary:        OpenTelemetry FastAPI Instrumentation
 License:        Apache-2.0
@@ -74,7 +74,7 @@
 
 %if %{with test}
 %check
-%pytest
+%pytest -k "not (test_no_instrumentation)"
 %endif
 
 %if !%{with test}

++++++ opentelemetry_instrumentation_fastapi-0.58b0.tar.gz -> 
opentelemetry_instrumentation_fastapi-0.59b0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_instrumentation_fastapi-0.58b0/PKG-INFO 
new/opentelemetry_instrumentation_fastapi-0.59b0/PKG-INFO
--- old/opentelemetry_instrumentation_fastapi-0.58b0/PKG-INFO   2020-02-02 
01:00:00.000000000 +0100
+++ new/opentelemetry_instrumentation_fastapi-0.59b0/PKG-INFO   2020-02-02 
01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: opentelemetry-instrumentation-fastapi
-Version: 0.58b0
+Version: 0.59b0
 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.13
 Requires-Python: >=3.9
 Requires-Dist: opentelemetry-api~=1.12
-Requires-Dist: opentelemetry-instrumentation-asgi==0.58b0
-Requires-Dist: opentelemetry-instrumentation==0.58b0
-Requires-Dist: opentelemetry-semantic-conventions==0.58b0
-Requires-Dist: opentelemetry-util-http==0.58b0
+Requires-Dist: opentelemetry-instrumentation-asgi==0.59b0
+Requires-Dist: opentelemetry-instrumentation==0.59b0
+Requires-Dist: opentelemetry-semantic-conventions==0.59b0
+Requires-Dist: opentelemetry-util-http==0.59b0
 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.58b0/pyproject.toml 
new/opentelemetry_instrumentation_fastapi-0.59b0/pyproject.toml
--- old/opentelemetry_instrumentation_fastapi-0.58b0/pyproject.toml     
2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_instrumentation_fastapi-0.59b0/pyproject.toml     
2020-02-02 01:00:00.000000000 +0100
@@ -26,10 +26,10 @@
 ]
 dependencies = [
   "opentelemetry-api ~= 1.12",
-  "opentelemetry-instrumentation == 0.58b0",
-  "opentelemetry-instrumentation-asgi == 0.58b0",
-  "opentelemetry-semantic-conventions == 0.58b0",
-  "opentelemetry-util-http == 0.58b0",
+  "opentelemetry-instrumentation == 0.59b0",
+  "opentelemetry-instrumentation-asgi == 0.59b0",
+  "opentelemetry-semantic-conventions == 0.59b0",
+  "opentelemetry-util-http == 0.59b0",
 ]
 
 [project.optional-dependencies]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_instrumentation_fastapi-0.58b0/src/opentelemetry/instrumentation/fastapi/__init__.py
 
new/opentelemetry_instrumentation_fastapi-0.59b0/src/opentelemetry/instrumentation/fastapi/__init__.py
--- 
old/opentelemetry_instrumentation_fastapi-0.58b0/src/opentelemetry/instrumentation/fastapi/__init__.py
      2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_instrumentation_fastapi-0.59b0/src/opentelemetry/instrumentation/fastapi/__init__.py
      2020-02-02 01:00:00.000000000 +0100
@@ -191,7 +191,7 @@
 import fastapi
 from starlette.applications import Starlette
 from starlette.middleware.errors import ServerErrorMiddleware
-from starlette.routing import Match
+from starlette.routing import Match, Route
 from starlette.types import ASGIApp, Receive, Scope, Send
 
 from opentelemetry.instrumentation._semconv import (
@@ -474,7 +474,11 @@
     route = None
 
     for starlette_route in app.routes:
-        match, _ = starlette_route.matches(scope)
+        match, _ = (
+            Route.matches(starlette_route, scope)
+            if isinstance(starlette_route, Route)
+            else starlette_route.matches(scope)
+        )
         if match == Match.FULL:
             try:
                 route = starlette_route.path
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_instrumentation_fastapi-0.58b0/src/opentelemetry/instrumentation/fastapi/version.py
 
new/opentelemetry_instrumentation_fastapi-0.59b0/src/opentelemetry/instrumentation/fastapi/version.py
--- 
old/opentelemetry_instrumentation_fastapi-0.58b0/src/opentelemetry/instrumentation/fastapi/version.py
       2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_instrumentation_fastapi-0.59b0/src/opentelemetry/instrumentation/fastapi/version.py
       2020-02-02 01:00:00.000000000 +0100
@@ -12,4 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-__version__ = "0.58b0"
+__version__ = "0.59b0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_instrumentation_fastapi-0.58b0/tests/test_fastapi_instrumentation.py
 
new/opentelemetry_instrumentation_fastapi-0.59b0/tests/test_fastapi_instrumentation.py
--- 
old/opentelemetry_instrumentation_fastapi-0.58b0/tests/test_fastapi_instrumentation.py
      2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_instrumentation_fastapi-0.59b0/tests/test_fastapi_instrumentation.py
      2020-02-02 01:00:00.000000000 +0100
@@ -20,14 +20,17 @@
 import weakref as _weakref
 from contextlib import ExitStack
 from timeit import default_timer
-from typing import Any, cast
+from typing import Any, Final, cast
 from unittest.mock import Mock, call, patch
 
 import fastapi
 import pytest
 from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware
 from fastapi.responses import JSONResponse, PlainTextResponse
+from fastapi.routing import APIRoute
 from fastapi.testclient import TestClient
+from starlette.routing import Match
+from starlette.types import Receive, Scope, Send
 
 import opentelemetry.instrumentation.fastapi as otel_fastapi
 from opentelemetry import trace
@@ -131,6 +134,23 @@
 )
 
 
+class CustomMiddleware:
+    def __init__(self, app: fastapi.FastAPI) -> None:
+        self.app = app
+
+    async def __call__(
+        self, scope: Scope, receive: Receive, send: Send
+    ) -> None:
+        scope["nonstandard_field"] = "here"
+        await self.app(scope, receive, send)
+
+
+class CustomRoute(APIRoute):
+    def matches(self, scope: Scope) -> tuple[Match, Scope]:
+        assert "nonstandard_field" in scope
+        return super().matches(scope)
+
+
 class TestBaseFastAPI(TestBase):
     def _create_app(self):
         app = self._create_fastapi_app()
@@ -191,6 +211,7 @@
         self._instrumentor = otel_fastapi.FastAPIInstrumentor()
         self._app = self._create_app()
         self._app.add_middleware(HTTPSRedirectMiddleware)
+        self._app.add_middleware(CustomMiddleware)
         self._client = TestClient(self._app, base_url="https://testserver:443";)
         # run the lifespan, initialize the middleware stack
         # this is more in-line with what happens in a real application when 
the server starts up
@@ -210,6 +231,7 @@
     def _create_fastapi_app():
         app = fastapi.FastAPI()
         sub_app = fastapi.FastAPI()
+        custom_router = fastapi.APIRouter(route_class=CustomRoute)
 
         @sub_app.get("/home")
         async def _():
@@ -235,6 +257,12 @@
         async def _():
             raise UnhandledException("This is an unhandled exception")
 
+        @custom_router.get("/success")
+        async def _():
+            return None
+
+        app.include_router(custom_router, prefix="/custom-router")
+
         app.mount("/sub", app=sub_app)
         app.host("testserver2", sub_app)
 
@@ -313,6 +341,28 @@
             span.attributes[HTTP_URL],
         )
 
+    def test_custom_api_router(self):
+        """
+        This test is to ensure that custom API routers the 
OpenTelemetryMiddleware does not cause issues with
+        custom API routers that depend on non-standard fields on the ASGI 
scope.
+        """
+        resp: Final = self._client.get("/custom-router/success")
+        spans: Final = self.memory_exporter.get_finished_spans()
+        spans_with_http_attributes = [
+            span
+            for span in spans
+            if (HTTP_URL in span.attributes or HTTP_TARGET in span.attributes)
+        ]
+        self.assertEqual(200, resp.status_code)
+        for span in spans_with_http_attributes:
+            self.assertEqual(
+                "/custom-router/success", span.attributes[HTTP_TARGET]
+            )
+            self.assertEqual(
+                "https://testserver/custom-router/success";,
+                span.attributes[HTTP_URL],
+            )
+
     def test_host_fastapi_call(self):
         client = TestClient(self._app, base_url="https://testserver2:443";)
         client.get("/")
@@ -1017,6 +1067,7 @@
     def _create_fastapi_app():
         app = fastapi.FastAPI()
         sub_app = fastapi.FastAPI()
+        custom_router = fastapi.APIRouter(route_class=CustomRoute)
 
         @sub_app.get("/home")
         async def _():
@@ -1042,6 +1093,12 @@
         async def _():
             raise UnhandledException("This is an unhandled exception")
 
+        @custom_router.get("/success")
+        async def _():
+            return None
+
+        app.include_router(custom_router, prefix="/custom-router")
+
         app.mount("/sub", app=sub_app)
 
         return app

Reply via email to