Open jhuitema opened 6 months ago
When I try to use the inprogress metrics, the metric_namespace and metric_subsystem settings are ignored.
inprogress
metric_namespace
metric_subsystem
_APP = FastAPI( title="MyApp", version=__version__, ) _PROM_INST = Instrumentator( should_instrument_requests_inprogress=True, inprogress_labels=True, ) _PROM_INST.instrument(_APP, metric_namespace="myapp", metric_subsystem="webapi") _PROM_INST.expose(_APP)
This creates a http_requests_inprogress metric instead of the myapp_webapi_http_requests_inprogress metric I would expect.
http_requests_inprogress
myapp_webapi_http_requests_inprogress
I can get around this by setting my own inprogress_name to include the namespace and subsystem but it would be more convenient if it was done for me.
inprogress_name
I think this could be fixed by adding the metric_namespace and metric_subsystem to this line.
When I try to use the
inprogress
metrics, themetric_namespace
andmetric_subsystem
settings are ignored.Reproduction example
Result
This creates a
http_requests_inprogress
metric instead of themyapp_webapi_http_requests_inprogress
metric I would expect.Workaround
I can get around this by setting my own
inprogress_name
to include the namespace and subsystem but it would be more convenient if it was done for me.Potential Fix
I think this could be fixed by adding the
metric_namespace
andmetric_subsystem
to this line.