Skip to content

Commit

Permalink
Merge pull request #39 from celloni/fix-uppercase-multiproc-env-var
Browse files Browse the repository at this point in the history
respect PROMETHEUS_MULTIPROC_DIR in example metrics view
  • Loading branch information
perdy committed Feb 5, 2024
2 parents 34aa2f7 + a28db1d commit 10ffd5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion starlette_prometheus/view.py
Expand Up @@ -6,7 +6,7 @@


def metrics(request: Request) -> Response:
if "prometheus_multiproc_dir" in os.environ:
if "prometheus_multiproc_dir" in os.environ or "PROMETHEUS_MULTIPROC_DIR" in os.environ:
registry = CollectorRegistry()
MultiProcessCollector(registry)
else:
Expand Down

0 comments on commit 10ffd5e

Please sign in to comment.