File: README.md

package info (click to toggle)
prometheus-fastapi-instrumentator 7.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 492 kB
  • sloc: python: 2,586; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 492 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Example `default-metrics-diff-labels`

Example that shows usage of PFI with a custom instrumentation function that
mimics the default metrics but with custom label names.

To run the example, you must have run `poetry install` and `poetry shell` in the
root of this repository. The following commands are executed relative to this
directory.

Start app with Uvicorn:

```python
uvicorn main:app
```

Interact with the app:

```shell
curl localhost:8000/ping
curl localhost:8000/metrics
```