The Telemetry module in NocoBase is built on top of OpenTelemetry, providing unified and extensible observability capabilities for NocoBase applications. This module supports collecting and exporting various application metrics, including HTTP requests and system resource usage.
To enable the telemetry module, you need to configure the relevant environment variables.
Set to on.
Service name.
Metric exporters. Multiple exporters are supported and separated by commas. Refer to the documentation of existing exporters for available values.
Metrics to export, separated by commas. Available values can be found in Metrics.
Threshold for recording HTTP request duration (http_request_cost), in milliseconds. The default value is 0, meaning all requests are recorded. When set to a value greater than 0, only requests whose duration exceeds this threshold will be recorded.
The current metrics recorded by the application are listed below. If you need additional metrics, you can refer to the development documentation for extension or contact us.
| Metric Name | Metric Type | Description |
|---|---|---|
process_cpu_percent | ObservableGauge | Process CPU usage percentage |
process_memory_mb | ObservableGauge | Process memory usage in MB |
process_heap_mb | ObservableGauge | Process heap memory usage in MB |
http_request_cost | Histogram | HTTP request duration in ms |
http_request_count | Counter | Number of HTTP requests |
http_request_active | UpDownCounter | Current number of active HTTP requests |
sub_app_status | ObservableGauge | Statistics of sub-application counts by status, reported by the plugin-multi-app-manager plugin |