File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
microbootstrap/instruments Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,7 @@ class YourFastApiSettings(FastApiSettings):
233233 service_name: str
234234
235235 prometheus_metrics_path: str = " /metrics"
236+ prometheus_metrics_include_in_schema: bool = False
236237 prometheus_instrumentator_params: dict[str , typing.Any] = {}
237238 prometheus_instrument_params: dict[str , typing.Any] = {}
238239 prometheus_expose_params: dict[str , typing.Any] = {}
@@ -244,6 +245,7 @@ Parameters description:
244245
245246- ` service_name ` - will be attached to metric's names, but has to be named in [ snake_case] ( https://en.wikipedia.org/wiki/Snake_case ) .
246247- ` prometheus_metrics_path ` - path to metrics handler.
248+ - ` prometheus_metrics_include_in_schema ` - whether to include metrics route in OpenAPI schema.
247249- ` prometheus_instrumentator_params ` - will be passed to ` Instrumentor ` during initialization.
248250- ` prometheus_instrument_params ` - will be passed to ` Instrumentor.instrument(...) ` .
249251- ` prometheus_expose_params ` - will be passed to ` Instrumentor.expose(...) ` .
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class BasePrometheusConfig(BaseInstrumentConfig):
1414 service_name : str = "micro-service"
1515
1616 prometheus_metrics_path : str = "/metrics"
17+ prometheus_metrics_include_in_schema : bool = False
1718
1819
1920class LitestarPrometheusConfig (BasePrometheusConfig ):
You can’t perform that action at this time.
0 commit comments