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: README.md
+23-24Lines changed: 23 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,18 +15,29 @@ Make sure you have the **Rust toolchain** installed. You can find instructions [
15
15
## Standalone
16
16
17
17
1. Run the gateway:
18
-
```
18
+
19
+
In **debug** mode:
20
+
```bash
19
21
cargo run
20
22
```
21
-
2. After the gateway starts, it prints something like:
23
+
In **release** mode:
24
+
```bash
25
+
cargo build --release
22
26
27
+
./target/release/ic_websocket_gateway
23
28
```
24
-
2023-08-01T07:55:58.315793Z INFO ic_websocket_gateway::manager: Gateway Agent principal: sqdfl-mr4km-2hfjy-gajqo-xqvh7-hf4mf-nra4i-3it6l-neaw4-soolw-tae
25
-
```
26
29
27
-
This is the principal that the gateway uses to interact with the canister IC WebSocket CDK.
30
+
2. The output in the terminal should look like (some lines are omitted for brevity):
31
+
32
+
```bash
33
+
...
28
34
29
-
3. Copy the gateway principal as you will need it to initialize the canister CDK, so that the canister can authenticate the gateway. How to do this is explained in the [ic_websocket_example](https://github.com/omnia-network/ic_websocket_example#running-the-project-locally) README.
35
+
2024-03-14T11:19:33.649874Z INFO ic_websocket_gateway: Gateway Agent principal: lk7eq-k74k2-khrsw-n2xau-7ujb2-f5ao7-zkpqn-cbbx2-4xn3f-aibn4-uae
36
+
37
+
...
38
+
39
+
2024-03-14T11:19:33.650018Z INFO ic_websocket_gateway::manager: Start accepting incoming connections
40
+
```
30
41
31
42
### Options available
32
43
@@ -38,7 +49,7 @@ There are some command line arguments that you can set when running the gateway:
38
49
|`--polling-interval`| The interval (in **milliseconds**) at which the gateway will poll the canisters for new messages. |`100`|
39
50
|`--tls-certificate-pem-path`| The path to the TLS certificate file. See [Obtain a TLS certificate](#obtain-a-tls-certificate) for more details. | _empty_ |
40
51
|`--tls-certificate-key-pem-path`| The path to the TLS private key file. See [Obtain a TLS certificate](#obtain-a-tls-certificate) for more details. | _empty_ |
41
-
| `--opentelemetry-collector-endpoint` | Jaeger agent endpoint for the telemetry in the format <host>:<port>. See [Tracing telemetry](#tracing-telemetry) for more details. | _empty_ |
52
+
|`--opentelemetry-collector-endpoint`|OpenTelemetry collector endpoint. See [Tracing telemetry](#tracing-telemetry) for more details. | _empty_ |
42
53
43
54
## Docker
44
55
@@ -127,28 +138,16 @@ The gateway uses the [opentelemetry](https://docs.rs/opentelemetry) crate and [G
127
138
- set the `--opentelemetry-collector-endpoint` argument to point to the opentelemetry collector endpoint (leaving it empty or unset will disable tracing telemetry);
128
139
- optionally set the `RUST_LOG_TELEMETRY` environment variable, which defaults to `trace`, following the same principles described in the [Configure logging](#configure-logging) section.
129
140
130
-
If you're deploying the gateway locally for testing from the [docker-compose.yml](./docker-compose.yml) file, you can run both an opentelemetry collector and grafana together with the gateway by:
131
-
132
-
```
133
-
docker compose --profile telemetry-local up -d
134
-
```
135
-
136
-
Before you do so, make sure you set the following varibales in the `.env` file:
141
+
If you're deploying the gateway with Docker (see the [Docker](#docker) section), make sure you set the following varibales in the `.env` file:
If you are deploying the gateway in production and want to send the telemetry traces to Grafana Cloud, you only need to deploy the OTLP collector. To do so, run:
145
-
146
-
```
147
-
docker compose --profile telemetry-prod up -d
148
-
```
149
-
150
-
Before you do so, make sure you set the following varibales in the `.env` file:
0 commit comments