Skip to content

Conversation

@leafty
Copy link
Member

@leafty leafty commented Oct 23, 2025

When enabled, the server-side of the UI will produce prometheus metrics.

/deploy renku=leafty/ui-feat-server-side-metrics

Logs when running with metrics enabled:

Starting production server
Setting up metrics
Prometheus exporter is running at http://localhost:9090/metrics
Server is running at http://localhost:3000

Example of custom metrics:

# HELP http_requests_total Total number of HTTP requests.
# TYPE http_requests_total counter
http_requests_total{method="GET",status_code="200"} 8074
http_requests_total{method="GET",status_code="404"} 3

Full example:

# HELP process_cpu_user_seconds_total Total user CPU time spent in seconds.
# TYPE process_cpu_user_seconds_total counter
process_cpu_user_seconds_total 107.08346899999991

# HELP process_cpu_system_seconds_total Total system CPU time spent in seconds.
# TYPE process_cpu_system_seconds_total counter
process_cpu_system_seconds_total 43.819293000000016

# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 150.90276199999983

# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1761576810

# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 131768320

# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 12111323136

# HELP process_heap_bytes Process heap size in bytes.
# TYPE process_heap_bytes gauge
process_heap_bytes 173371392

# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 28

# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 1048576

# HELP nodejs_eventloop_lag_seconds Lag of event loop in seconds.
# TYPE nodejs_eventloop_lag_seconds gauge
nodejs_eventloop_lag_seconds 0.000971473

# HELP nodejs_eventloop_lag_min_seconds The minimum recorded event loop delay.
# TYPE nodejs_eventloop_lag_min_seconds gauge
nodejs_eventloop_lag_min_seconds 0.00909312

# HELP nodejs_eventloop_lag_max_seconds The maximum recorded event loop delay.
# TYPE nodejs_eventloop_lag_max_seconds gauge
nodejs_eventloop_lag_max_seconds 0.013049855

# HELP nodejs_eventloop_lag_mean_seconds The mean of the recorded event loop delays.
# TYPE nodejs_eventloop_lag_mean_seconds gauge
nodejs_eventloop_lag_mean_seconds 0.010096607100401606

# HELP nodejs_eventloop_lag_stddev_seconds The standard deviation of the recorded event loop delays.
# TYPE nodejs_eventloop_lag_stddev_seconds gauge
nodejs_eventloop_lag_stddev_seconds 0.00022545205661100208

# HELP nodejs_eventloop_lag_p50_seconds The 50th percentile of the recorded event loop delays.
# TYPE nodejs_eventloop_lag_p50_seconds gauge
nodejs_eventloop_lag_p50_seconds 0.010084351

# HELP nodejs_eventloop_lag_p90_seconds The 90th percentile of the recorded event loop delays.
# TYPE nodejs_eventloop_lag_p90_seconds gauge
nodejs_eventloop_lag_p90_seconds 0.010117119

# HELP nodejs_eventloop_lag_p99_seconds The 99th percentile of the recorded event loop delays.
# TYPE nodejs_eventloop_lag_p99_seconds gauge
nodejs_eventloop_lag_p99_seconds 0.010903551

# HELP nodejs_active_resources Number of active resources that are currently keeping the event loop alive, grouped by async resource type.
# TYPE nodejs_active_resources gauge
nodejs_active_resources{type="PipeWrap"} 2
nodejs_active_resources{type="TCPServerWrap"} 2
nodejs_active_resources{type="TCPSocketWrap"} 5
nodejs_active_resources{type="Timeout"} 4
nodejs_active_resources{type="Immediate"} 1

# HELP nodejs_active_resources_total Total number of active resources.
# TYPE nodejs_active_resources_total gauge
nodejs_active_resources_total 14

# HELP nodejs_active_handles Number of active libuv handles grouped by handle type. Every handle type is C++ class name.
# TYPE nodejs_active_handles gauge
nodejs_active_handles{type="Socket"} 7
nodejs_active_handles{type="Server"} 2

# HELP nodejs_active_handles_total Total number of active handles.
# TYPE nodejs_active_handles_total gauge
nodejs_active_handles_total 9

# HELP nodejs_active_requests Number of active libuv requests grouped by request type. Every request type is C++ class name.
# TYPE nodejs_active_requests gauge

# HELP nodejs_active_requests_total Total number of active requests.
# TYPE nodejs_active_requests_total gauge
nodejs_active_requests_total 0

# HELP nodejs_heap_size_total_bytes Process heap size from Node.js in bytes.
# TYPE nodejs_heap_size_total_bytes gauge
nodejs_heap_size_total_bytes 33619968

# HELP nodejs_heap_size_used_bytes Process heap size used from Node.js in bytes.
# TYPE nodejs_heap_size_used_bytes gauge
nodejs_heap_size_used_bytes 30107192

# HELP nodejs_external_memory_bytes Node.js external memory size in bytes.
# TYPE nodejs_external_memory_bytes gauge
nodejs_external_memory_bytes 3864752

# HELP nodejs_heap_space_size_total_bytes Process heap space size total from Node.js in bytes.
# TYPE nodejs_heap_space_size_total_bytes gauge
nodejs_heap_space_size_total_bytes{space="read_only"} 0
nodejs_heap_space_size_total_bytes{space="new"} 1048576
nodejs_heap_space_size_total_bytes{space="old"} 19185664
nodejs_heap_space_size_total_bytes{space="code"} 4194304
nodejs_heap_space_size_total_bytes{space="shared"} 0
nodejs_heap_space_size_total_bytes{space="trusted"} 2404352
nodejs_heap_space_size_total_bytes{space="new_large_object"} 0
nodejs_heap_space_size_total_bytes{space="large_object"} 6787072
nodejs_heap_space_size_total_bytes{space="code_large_object"} 0
nodejs_heap_space_size_total_bytes{space="shared_large_object"} 0
nodejs_heap_space_size_total_bytes{space="trusted_large_object"} 0

# HELP nodejs_heap_space_size_used_bytes Process heap space size used from Node.js in bytes.
# TYPE nodejs_heap_space_size_used_bytes gauge
nodejs_heap_space_size_used_bytes{space="read_only"} 0
nodejs_heap_space_size_used_bytes{space="new"} 291376
nodejs_heap_space_size_used_bytes{space="old"} 17862624
nodejs_heap_space_size_used_bytes{space="code"} 3420864
nodejs_heap_space_size_used_bytes{space="shared"} 0
nodejs_heap_space_size_used_bytes{space="trusted"} 1781480
nodejs_heap_space_size_used_bytes{space="new_large_object"} 0
nodejs_heap_space_size_used_bytes{space="large_object"} 6754488
nodejs_heap_space_size_used_bytes{space="code_large_object"} 0
nodejs_heap_space_size_used_bytes{space="shared_large_object"} 0
nodejs_heap_space_size_used_bytes{space="trusted_large_object"} 0

# HELP nodejs_heap_space_size_available_bytes Process heap space size available from Node.js in bytes.
# TYPE nodejs_heap_space_size_available_bytes gauge
nodejs_heap_space_size_available_bytes{space="read_only"} 0
nodejs_heap_space_size_available_bytes{space="new"} 739536
nodejs_heap_space_size_available_bytes{space="old"} 958432
nodejs_heap_space_size_available_bytes{space="code"} 510784
nodejs_heap_space_size_available_bytes{space="shared"} 0
nodejs_heap_space_size_available_bytes{space="trusted"} 578336
nodejs_heap_space_size_available_bytes{space="new_large_object"} 1048576
nodejs_heap_space_size_available_bytes{space="large_object"} 0
nodejs_heap_space_size_available_bytes{space="code_large_object"} 0
nodejs_heap_space_size_available_bytes{space="shared_large_object"} 0
nodejs_heap_space_size_available_bytes{space="trusted_large_object"} 0

# HELP nodejs_version_info Node.js version info.
# TYPE nodejs_version_info gauge
nodejs_version_info{version="v22.21.0",major="22",minor="21",patch="0"} 1

# HELP nodejs_gc_duration_seconds Garbage collection duration by kind, one of major, minor, incremental or weakcb.
# TYPE nodejs_gc_duration_seconds histogram
nodejs_gc_duration_seconds_bucket{le="0.001",kind="incremental"} 46
nodejs_gc_duration_seconds_bucket{le="0.01",kind="incremental"} 56
nodejs_gc_duration_seconds_bucket{le="0.1",kind="incremental"} 76
nodejs_gc_duration_seconds_bucket{le="1",kind="incremental"} 76
nodejs_gc_duration_seconds_bucket{le="2",kind="incremental"} 76
nodejs_gc_duration_seconds_bucket{le="5",kind="incremental"} 76
nodejs_gc_duration_seconds_bucket{le="+Inf",kind="incremental"} 76
nodejs_gc_duration_seconds_sum{kind="incremental"} 0.3731860439744778
nodejs_gc_duration_seconds_count{kind="incremental"} 76
nodejs_gc_duration_seconds_bucket{le="0.001",kind="major"} 0
nodejs_gc_duration_seconds_bucket{le="0.01",kind="major"} 71
nodejs_gc_duration_seconds_bucket{le="0.1",kind="major"} 71
nodejs_gc_duration_seconds_bucket{le="1",kind="major"} 71
nodejs_gc_duration_seconds_bucket{le="2",kind="major"} 71
nodejs_gc_duration_seconds_bucket{le="5",kind="major"} 71
nodejs_gc_duration_seconds_bucket{le="+Inf",kind="major"} 71
nodejs_gc_duration_seconds_sum{kind="major"} 0.15274595399340613
nodejs_gc_duration_seconds_count{kind="major"} 71
nodejs_gc_duration_seconds_bucket{le="0.001",kind="minor"} 4228
nodejs_gc_duration_seconds_bucket{le="0.01",kind="minor"} 4274
nodejs_gc_duration_seconds_bucket{le="0.1",kind="minor"} 4275
nodejs_gc_duration_seconds_bucket{le="1",kind="minor"} 4275
nodejs_gc_duration_seconds_bucket{le="2",kind="minor"} 4275
nodejs_gc_duration_seconds_bucket{le="5",kind="minor"} 4275
nodejs_gc_duration_seconds_bucket{le="+Inf",kind="minor"} 4275
nodejs_gc_duration_seconds_sum{kind="minor"} 2.021798426907503
nodejs_gc_duration_seconds_count{kind="minor"} 4275

# HELP http_request_duration_seconds duration histogram of http responses labeled with: status_code, method
# TYPE http_request_duration_seconds histogram
http_request_duration_seconds_bucket{le="0.003",status_code="200",method="GET"} 7764
http_request_duration_seconds_bucket{le="0.03",status_code="200",method="GET"} 8073
http_request_duration_seconds_bucket{le="0.1",status_code="200",method="GET"} 8073
http_request_duration_seconds_bucket{le="0.3",status_code="200",method="GET"} 8074
http_request_duration_seconds_bucket{le="1.5",status_code="200",method="GET"} 8074
http_request_duration_seconds_bucket{le="10",status_code="200",method="GET"} 8074
http_request_duration_seconds_bucket{le="+Inf",status_code="200",method="GET"} 8074
http_request_duration_seconds_sum{status_code="200",method="GET"} 16.12036073000005
http_request_duration_seconds_count{status_code="200",method="GET"} 8074
http_request_duration_seconds_bucket{le="0.003",status_code="404",method="GET"} 0
http_request_duration_seconds_bucket{le="0.03",status_code="404",method="GET"} 3
http_request_duration_seconds_bucket{le="0.1",status_code="404",method="GET"} 3
http_request_duration_seconds_bucket{le="0.3",status_code="404",method="GET"} 3
http_request_duration_seconds_bucket{le="1.5",status_code="404",method="GET"} 3
http_request_duration_seconds_bucket{le="10",status_code="404",method="GET"} 3
http_request_duration_seconds_bucket{le="+Inf",status_code="404",method="GET"} 3
http_request_duration_seconds_sum{status_code="404",method="GET"} 0.015539727
http_request_duration_seconds_count{status_code="404",method="GET"} 3

# HELP up 1 = up, 0 = not up
# TYPE up gauge
up 1

# HELP http_requests_total Total number of HTTP requests.
# TYPE http_requests_total counter
http_requests_total{method="GET",status_code="200"} 8074
http_requests_total{method="GET",status_code="404"} 3

@RenkuBot
Copy link
Contributor

You can access the deployment of this PR at https://renku-ci-ui-3889.dev.renku.ch

@leafty leafty marked this pull request as ready for review October 27, 2025 14:44
@leafty leafty requested a review from a team as a code owner October 27, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants