Skip to content

Commit 0d8b65a

Browse files
committed
Update readme
1 parent 07ef739 commit 0d8b65a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def sayHello:
5050

5151
Autometrics makes it easy to add Prometheus alerts using Service-Level Objectives (SLOs) to a function or group of functions.
5252

53-
This works using pre-defined [Prometheus alerting rules](https://github.com/autometrics-dev/autometrics-shared#prometheus-recording--alerting-rules). By default, most of the recording rules are dormant. They are enabled by specific metric labels that can be automatically attached by autometrics.
53+
In order to receive alerts you need to add a set of rules to your Prometheus set up. You can find out more about those rules here: [Prometheus alerting rules](https://github.com/autometrics-dev/autometrics-shared#prometheus-recording--alerting-rules). Once added, most of the recording rules are dormant. They are enabled by specific metric labels that can be automatically attached by autometrics.
5454

5555
To use autometrics SLOs and alerts, create one or multiple `Objective`s based on the function(s) success rate and/or latency, as shown below. The `Objective` can be passed as an argument to the `autometrics` macro to include the given function in that objective.
5656

@@ -74,6 +74,11 @@ Autometrics by default will try to store information on which function calls a d
7474
So instead of writing:
7575

7676
```py
77+
from functools import wraps
78+
from typing import Any, TypeVar, Callable
79+
80+
R = TypeVar("R")
81+
7782
def noop(func: Callable[..., R]) -> Callable[..., R]:
7883
"""A noop decorator that does nothing."""
7984

@@ -89,7 +94,7 @@ def api_handler():
8994
# ...
9095
```
9196

92-
You may want to:
97+
You may want to switch the order of the decorator
9398

9499
```py
95100
@autometrics

0 commit comments

Comments
 (0)