Skip to content

Commit ee2433b

Browse files
committed
Add cli for write uvicorn config in file
1 parent 66b4d26 commit ee2433b

File tree

6 files changed

+217
-86
lines changed

6 files changed

+217
-86
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,19 @@ but you can import `get_latest_metrics` from `asgi_monitor.metrics` to create a
9191
9292
See the `prometheus_client` [documentation](https://prometheus.github.io/client_python/) for adding your custom metrics.
9393

94+
#### CLI
95+
96+
You can also use the `command line interface` to generate the _uvicorn log config_ in a **json** file
97+
to run `uvicorn` via the `cli`.
98+
99+
```shell
100+
asgi-monitor uvicorn-log-config --path log-config.json --level info --json-format --include-trace
101+
102+
uvicorn main:app --log-config log-config.json
103+
```
104+
105+
106+
94107
#### Tracing
95108

96109
You can also add query tracing and your logic using `opentelemetry`.

0 commit comments

Comments
 (0)