File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
microbootstrap/bootstrappers Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 88from faststream .asgi import AsgiFastStream , AsgiResponse
99from faststream .asgi import get as handle_get
1010from faststream .specification import AsyncAPI
11+ from opentelemetry import trace
1112
1213from microbootstrap .bootstrappers .base import ApplicationBootstrapper
1314from microbootstrap .config .faststream import FastStreamConfig
2324from microbootstrap .settings import FastStreamSettings
2425
2526
27+ tracer : typing .Final = trace .get_tracer (__name__ )
28+
29+
2630class KwargsAsgiFastStream (AsgiFastStream ):
2731 def __init__ (self , ** kwargs : typing .Any ) -> None : # noqa: ANN401
2832 # `broker` argument is positional-only
@@ -107,6 +111,7 @@ def get_config_type(cls) -> type[FastStreamPrometheusConfig]:
107111class FastStreamHealthChecksInstrument (HealthChecksInstrument ):
108112 def bootstrap (self ) -> None : ...
109113 def bootstrap_before (self ) -> dict [str , typing .Any ]:
114+ @tracer .start_as_current_span (f"GET { self .instrument_config .health_checks_path } " )
110115 @handle_get
111116 async def check_health (scope : typing .Any ) -> AsgiResponse : # noqa: ANN401, ARG001
112117 return (
You can’t perform that action at this time.
0 commit comments