Skip to content

Commit b3bbdc6

Browse files
author
rsora
committed
Update docs with old README extract
1 parent 2d0808a commit b3bbdc6

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

docs/getting-started.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,3 +309,41 @@ FTDebouncer@1.3.0 downloaded
309309
Installing FTDebouncer@1.3.0...
310310
Installed FTDebouncer@1.3.0
311311
```
312+
313+
314+
Using the ``daemon`` mode and the gRPC interface
315+
------------------------------------------------
316+
317+
Arduino CLI can be launched as a gRPC server via the `daemon` command.
318+
319+
The [client_example] folder contains a sample client code that shows how to
320+
interact with the gRPC server. Available services and messages are detailed
321+
in the [gRPC reference] pages.
322+
323+
324+
To provide observability for the gRPC server activities besides logs,
325+
the `daemon` mode activates and exposes by default a [Prometheus](https://prometheus.io/)
326+
endpoint (http://localhost:9090/metrics) that can be fetched for
327+
telemetry data like:
328+
329+
```text
330+
# TYPE daemon_compile counter
331+
daemon_compile{buildProperties="",exportFile="",fqbn="arduino:samd:mkr1000",installationID="ed6f1f22-1fbe-4b1f-84be-84d035b6369c",jobs="0",libraries="",preprocess="false",quiet="false",showProperties="false",sketchPath="5ff767c6fa5a91230f5cb4e267c889aa61489ab2c4f70f35f921f934c1462cb6",success="true",verbose="true",vidPid="",warnings=""} 1 1580385724726
332+
333+
# TYPE daemon_board_list counter
334+
daemon_board_list{installationID="ed6f1f22-1fbe-4b1f-84be-84d035b6369c",success="true"} 1 1580385724833
335+
```
336+
337+
The telemetry settings are exposed via the ``telemetry`` section
338+
in the CLI configuration:
339+
340+
```yaml
341+
telemetry:
342+
enabled: true
343+
addr: :9090
344+
pattern: /metrics
345+
```
346+
347+
[client_example]: https://github.com/arduino/arduino-cli/blob/master/client_example
348+
[gRPC reference]: /rpc/commands
349+
[Prometheus]: https://prometheus.io/

0 commit comments

Comments
 (0)