Skip to content

Commit 44e7632

Browse files
committed
readd profile spans
1 parent b128fe2 commit 44e7632

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

services/catalog/src/simcore_service_catalog/api/rpc/_services.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
CatalogForbiddenError,
2727
CatalogItemNotFoundError,
2828
)
29+
from servicelib.tracing import with_profiled_span
2930

3031
from ...models.services_db import ServiceDBFilters
3132
from ...repository.groups import GroupsRepository
@@ -61,6 +62,7 @@ async def _wrapper(app: FastAPI, **kwargs):
6162

6263
@router.expose(reraise_if_error_type=(CatalogForbiddenError, ValidationError))
6364
@_profile_rpc_call
65+
@with_profiled_span
6466
@validate_call(config={"arbitrary_types_allowed": True})
6567
async def list_services_paginated(
6668
app: FastAPI,

services/director-v2/src/simcore_service_director_v2/api/rpc/_computations.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from models_library.services_types import ServiceRunID
1717
from models_library.users import UserID
1818
from servicelib.rabbitmq import RPCRouter
19+
from servicelib.tracing import with_profiled_span
1920
from servicelib.utils import limited_gather
2021

2122
from ...core.errors import ComputationalRunNotFoundError
@@ -35,6 +36,7 @@
3536

3637

3738
@router.expose(reraise_if_error_type=())
39+
@with_profiled_span
3840
async def list_computations_latest_iteration_page(
3941
app: FastAPI,
4042
*,

services/web/server/src/simcore_service_webserver/users/_notifications_rest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
parse_request_path_parameters_as,
1313
)
1414
from servicelib.redis import handle_redis_returns_union_types
15+
from servicelib.tracing import with_profiled_span
1516

1617
from .._meta import API_VTAG
1718
from ..login.decorators import login_required
@@ -124,6 +125,7 @@ async def mark_notification_as_read(request: web.Request) -> web.Response:
124125
@routes.get(f"/{API_VTAG}/me/permissions", name="list_user_permissions")
125126
@login_required
126127
@permission_required("user.permissions.read")
128+
@with_profiled_span
127129
async def list_user_permissions(request: web.Request) -> web.Response:
128130
req_ctx = UsersRequestContext.model_validate(request)
129131
list_permissions: list[UserPermission] = await _users_service.list_user_permissions(

services/web/server/src/simcore_service_webserver/users/_users_rest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
)
2727
from servicelib.logging_utils import log_context
2828
from servicelib.rest_constants import RESPONSE_MODEL_POLICY
29+
from servicelib.tracing import with_profiled_span
2930

3031
from .._meta import API_VTAG
3132
from ..exception_handling import (
@@ -112,6 +113,7 @@
112113
@routes.get(f"/{API_VTAG}/me", name="get_my_profile")
113114
@login_required
114115
@_handle_users_exceptions
116+
@with_profiled_span
115117
async def get_my_profile(request: web.Request) -> web.Response:
116118
product: Product = products_web.get_current_product(request)
117119
req_ctx = UsersRequestContext.model_validate(request)

0 commit comments

Comments
 (0)