Skip to content

Commit d26f0c4

Browse files
committed
Enable fastapi instrumentation
1 parent dbb07bf commit d26f0c4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

code/function/fastapp/utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ def setup_opentelemetry(app: FastAPI):
116116
}
117117

118118
# Create instrumenter
119-
# FastAPIInstrumentor.instrument_app(
120-
# app,
121-
# excluded_urls=f"{settings.API_V1_STR}/health/heartbeat",
122-
# tracer_provider=tracer_provider,
123-
# meter_provider=meter_provider,
124-
# )
119+
FastAPIInstrumentor.instrument_app(
120+
app,
121+
excluded_urls=f"{settings.API_V1_STR}/health/heartbeat",
122+
tracer_provider=tracer_provider,
123+
meter_provider=meter_provider,
124+
)
125125
HTTPXClientInstrumentor().instrument()
126126
SystemMetricsInstrumentor(config=system_metrics_config).instrument()

0 commit comments

Comments
 (0)