Skip to content

Commit

Permalink
bump version and add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhillier committed Nov 5, 2020
1 parent 15a8a01 commit 9fb0765
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ app.add_route("/metrics", handle_metrics)

`prefix`: Sets the prefix of the exported metric names (default: `starlette`).

`buckets`: accepts an optional list of numbers to use as histogram buckets. The default value is `None`, which will cause the library to fall back on the Prometheus defaults (currently `[0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0]`).

Example:
```python
app.add_middleware(PrometheusMiddleware, app_name="hello_world", group_paths=True, prefix='myapp')
app.add_middleware(PrometheusMiddleware, app_name="hello_world", group_paths=True, prefix='myapp', buckets=[0.1, 0.25, 0.5])
```

## Custom Metrics
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='starlette_exporter',
version='0.5.1',
version='0.6.0',
author='Stephen Hillier',
author_email='[email protected]',
packages=['starlette_exporter'],
Expand Down

0 comments on commit 9fb0765

Please sign in to comment.