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
+37-2
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Having remote diagnostics facility helps in identifying such issues faster. ESP
14
14
15
15

16
16
17
-
Currently, developers can monitor the following information from the web-based dashboard:
17
+
Developers can monitor the following information from the web-based dashboard:
18
18
19
19
- Error logs: Anything that is logged on console with calls with ESP_LOGE by any component in the firmware
20
20
- Warning logs: Anything that is logged on console with calls with ESP_LOGW by any component in the firmware
@@ -34,6 +34,12 @@ You can find more details on [Insights Features](FEATURES.md) page.
34
34
## Getting Started
35
35
Following code should get you started, and your application can start reporting ESP Insights data to the Insights cloud.
36
36
37
+
### Enabling ESP-Insights
38
+
By default, `ESP-Insights` is disabled. User need to enable it via menuconfig option.
39
+
`(Component config → ESP Insights)`
40
+
41
+
To select transport to be used, please follow next step.
42
+
37
43
### Enabling Insights with HTTPS
38
44
For Insights agent HTTPS is configure as the default transport.
39
45
@@ -62,7 +68,7 @@ Here is how you can obtain the ESP Insights Auth Key:
62
68
63
69
### Enabling Insights with MQTT
64
70
Configure the default insights transport to MQTT (Component config → ESP Insights → Insights default transport → MQTT).
65
-
Alternately you can add `CONFIG_ESP_INSIGHTS_TRANSPORT_MQTT=y` to `sdkconfig.defaults`.
71
+
Alternatively, you can add `CONFIG_ESP_INSIGHTS_TRANSPORT_MQTT=y` to `sdkconfig.defaults`.
66
72
67
73
```c
68
74
#include<esp_insights.h>
@@ -80,3 +86,32 @@ Alternately you can add `CONFIG_ESP_INSIGHTS_TRANSPORT_MQTT=y` to `sdkconfig.def
80
86
You will require the MQTT certs which you can obtain by performing [Claiming](examples/minimal_diagnostics#esp-insights-over-mqtt).
81
87
82
88
For more details please head over to [examples](examples).
89
+
90
+
## Behind the Scenes
91
+
92
+
- As described in the overview section, ESP-Insights collects data of your choice and stores it in storage, the storage currently used is RTC store.
93
+
- The data is split into two sections, and the size is configurable via menuconfig:
94
+
- Critical: Errors, Warnings and Events
95
+
- Non-Critical: Metrics and Variables
96
+
- This data is then periodically encoded in CBOR format and is sent over the transport.
97
+
- The data send algorithm is dynamic withing a range. It adapts to the need of the reporting.
98
+
99
+
### RTC data store
100
+
ESP-Insight currently uses RTC memory to store the messages until it is sent to the cloud. Unlike, normal RAM, RTC store makes data available across soft resets. Thus, it brodens the usefulness of the data across reboot.
101
+
102
+
Messages in Critical data take `121` bytes per message. Hence, one can calculate, say a `2048` bytes of critical section can hold `16` messages before it starts dropping new messages.
103
+
Likewise Non-critical messages take `49` bytes per message and hence a `1024` bytes storage can hold `21` messages.
104
+
105
+
The RTC memory is limited and flooding too many messages, makes RTC storage full. Once full, the framework has to drop the messages.
106
+
One solution is to increase the data reporting frequency to cloud, and thereby emptying the RTC store frequently.
107
+
> **_Note_**
108
+
This however comes with the network cost. It is advisable for a developer to keep Insights logging concise and not overdo it.
109
+
110
+
## Contributing
111
+
112
+
If you find an issue with ESP-Insights, or wish to submit an enhancement request, please use the Issues section on Github.
113
+
For ESP-IDF related issues please use [esp-idf](https://github.com/espressif/esp-idf) repo.
114
+
115
+
## License
116
+
117
+
ESP-Insights code is covered under Apache2 license. Submodules and other third party repos have their own license.
0 commit comments