You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/basic-example-metrics/README.md
+6-21Lines changed: 6 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,14 @@
2
2
3
3
This guide demonstrates how to configure and use the OpenZeppelin Relayer service with metrics monitoring. In this example, we configure and utilize an Ethereum Sepolia Relayer integrated with Prometheus and Grafana for comprehensive performance tracking.
Then, update the `KEYSTORE_PASSPHRASE` field in the `examples/basic-example-metrics/.env` file with the password you used.
48
42
49
-
50
-
51
43
### Step 3: Configure Notifications
52
44
53
-
54
45
#### Configure Webhook URL
55
46
56
47
`examples/basic-example-metrics/config/config.json` file is partially pre-configured. You need to specify the webhook URL that will receive updates from the relayer service.
57
48
58
49
For simplicity, visit [Webhook.site](https://webhook.site), copy your unique URL, and then update the notifications[0].url field in `examples/basic-example-metrics/config/config.json` with this value.
59
50
60
-
61
51
#### Configure Webhook Signing Key
62
52
63
53
To sign webhook notification payloads, populate the `WEBHOOK_SIGNING_KEY` entry in the `examples/basic-example-metrics/.env` file.
@@ -67,12 +57,11 @@ For development purposes, you can generate the signing key using:
67
57
```bash
68
58
cargo run --example generate_uuid
69
59
```
70
-
> Note: Alternatively, you can use any online UUID generator.
71
60
61
+
> Note: Alternatively, you can use any online UUID generator.
72
62
73
63
Copy the generated UUID and update the `WEBHOOK_SIGNING_KEY` entry in the `examples/basic-example-metrics/.env` file.
74
64
75
-
76
65
#### Configure Webhook Signing Key
77
66
78
67
To sign webhook notification payloads, populate the `WEBHOOK_SIGNING_KEY` entry in the `examples/basic-example/.env` file.
@@ -82,35 +71,31 @@ For development purposes, you can generate the signing key using:
82
71
```bash
83
72
cargo run --example generate_uuid
84
73
```
85
-
> Note: Alternatively, you can use any online UUID generator.
86
74
75
+
> Note: Alternatively, you can use any online UUID generator.
87
76
88
77
Copy the generated UUID and update the `WEBHOOK_SIGNING_KEY` entry in the `examples/basic-example/.env` file.
89
78
90
-
91
79
### Step 4: Configure API Key
92
80
93
81
Generate an API key signing key for development purposes using:
94
82
95
83
```bash
96
84
cargo run --example generate_uuid
97
85
```
98
-
> Note: Alternatively, you can use any online UUID generator.
99
86
87
+
> Note: Alternatively, you can use any online UUID generator.
100
88
101
89
Copy the generated UUID and update the `API_KEY` entry in the `examples/basic-example-metrics/.env` file.
102
90
103
-
104
-
105
91
### Step 5: Run the Service
106
92
107
-
Start the service with Docker Compose:
93
+
Start the service with Docker Compose and metrics (Prometheus and Grafana):
108
94
109
95
```bash
110
-
docker compose -f examples/basic-example-metrics/docker-compose.yaml up
96
+
docker compose -f examples/basic-example-metrics/docker-compose.yaml --profile metrics up -d
111
97
```
112
98
113
-
114
99
### Step 6: Test the Relayer
115
100
116
101
The service is available at `http://localhost:8080/api/v1`
@@ -121,13 +106,13 @@ curl -X GET http://localhost:8080/api/v1/relayers \
121
106
-H "AUTHORIZATION: Bearer YOUR_API_KEY"
122
107
```
123
108
124
-
125
109
### Step 7: Access Metrics Dashboards
126
110
127
111
- Prometheus is available at: http://localhost:9090
0 commit comments