File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
packages/service-library/src/servicelib
services/web/server/src/simcore_service_webserver/users Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 55from typing import Any , Final , TypeAlias
66
77import pyinstrument
8+ import pyinstrument .renderers
89from opentelemetry import context as otcontext
910from opentelemetry import trace
1011from opentelemetry .instrumentation .logging import LoggingInstrumentor
@@ -83,9 +84,12 @@ async def wrapper(*args: Any, **kwargs: Any) -> Any:
8384
8485 finally :
8586 profiler .stop ()
87+ renderer = pyinstrument .renderers .ConsoleRenderer (
88+ unicode = True , color = False , show_all = True
89+ )
8690 span .set_attribute (
8791 _PROFILE_ATTRIBUTE_NAME ,
88- profiler .output_text ( unicode = True , color = False ),
92+ profiler .output ( renderer = renderer ),
8993 )
9094
9195 return wrapper
Original file line number Diff line number Diff line change 2626)
2727from servicelib .logging_utils import log_context
2828from servicelib .rest_constants import RESPONSE_MODEL_POLICY
29+ from servicelib .tracing import with_profiled_span
2930
3031from .._meta import API_VTAG
3132from ..exception_handling import (
110111
111112
112113@routes .get (f"/{ API_VTAG } /me" , name = "get_my_profile" )
114+ @with_profiled_span
113115@login_required
114116@_handle_users_exceptions
115117async def get_my_profile (request : web .Request ) -> web .Response :
You can’t perform that action at this time.
0 commit comments