diff --git a/profyle/middleware/fastapi.py b/profyle/middleware/fastapi.py index a7b8d0f..584f07f 100644 --- a/profyle/middleware/fastapi.py +++ b/profyle/middleware/fastapi.py @@ -14,7 +14,7 @@ def __init__( async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: if self.enabled and scope['type'] == 'http': - with profyle(name=scope['path']): + with profyle(name=scope['raw_path']): await self.app(scope, receive, send) return await self.app(scope, receive, send) diff --git a/pyproject.toml b/pyproject.toml index 04a7704..9fec3ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "profyle" -version = "0.0.12" +version = "0.0.13" description = "Profyle, a development tool for analysing and managing python traces" authors = ["Carlos Valdivia "] maintainers = [ diff --git a/tests/middleware/test_fastapi_middleware.py b/tests/middleware/test_fastapi_middleware.py index bac94b5..f587942 100644 --- a/tests/middleware/test_fastapi_middleware.py +++ b/tests/middleware/test_fastapi_middleware.py @@ -24,5 +24,5 @@ def run_middleware_1(): def test_fastapi_middleware(): - client.post('test') + client.post('test?demo=true') client.post('test1')