mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-03 16:38:35 +08:00
* Add Prometheus metrics to Kubernetes Access This PR adds several prometheus metrics to the Kubernetes Access package. The new metrics are: | Name | Type | Component | Description | | ----------------------------------------------------------------- | --------- | --------------------------- | --------------------------------------------------------------------------------------------------------- | | `teleport_kubernetes_client_in_flight_requests` | gauge | Teleport Kubernetes Service | In-flight requests waiting for the upstream response. | | `teleport_kubernetes_client_requests_total` | counter | Teleport Kubernetes Service | Total number of requests sent to the upstream teleport proxy, kube_service or Kubernetes Cluster servers. | | `teleport_kubernetes_client_tls_duration_seconds` | histogram | Teleport Kubernetes Service | Latency distribution of TLS handshakes. | | `teleport_kubernetes_client_got_conn_duration_seconds` | histogram | Teleport Kubernetes Service | Latency distribution of time to dial to the upstream server - using reversetunnel or direct dialer. | | `teleport_kubernetes_client_first_byte_response_duration_seconds` | histogram | Teleport Kubernetes Service | Latency distribution of time to receive the first response byte from the upstream server. | | `teleport_kubernetes_client_request_duration_seconds` | histogram | Teleport Kubernetes Service | Latency distribution of the upstream request time. | | Name | Type | Component | Description | | ----------------------------------------------------------- | --------- | --------------------------- | --------------------------------------------------- | | `teleport_kubernetes_server_in_flight_requests` | gauge | Teleport Kubernetes Service | In-flight requests currently handled by the server. | | `teleport_kubernetes_server_api_requests_total` | counter | Teleport Kubernetes Service | Total number of requests handled by the server. | | `teleport_kubernetes_server_request_duration_seconds` | histogram | Teleport Kubernetes Service | Latency distribution of the total request time. | | `teleport_kubernetes_server_response_size_bytes` | histogram | Teleport Kubernetes Service | Distribution of the response size. | | `teleport_kubernetes_server_exec_in_flight_sessions` | gauge | Teleport Kubernetes Service | Number of active kubectl exec sessions. | | `teleport_kubernetes_server_exec_sessions_total` | counter | Teleport Kubernetes Service | Total number of kubectl exec sessions. | | `teleport_kubernetes_server_portforward_in_flight_sessions` | gauge | Teleport Kubernetes Service | Number of active kubectl portforward sessions. | | `teleport_kubernetes_server_portforward_sessions_total` | counter | Teleport Kubernetes Service | Number of active kubectl portforward sessions. | | `teleport_kubernetes_server_join_in_flight_sessions` | gauge | Teleport Kubernetes Service | Number of active joining sessions, | | `teleport_kubernetes_server_join_sessions_total` | counter | Teleport Kubernetes Service | Total number of joining sessions. | Closes #29362 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com> * replace prometheus.MustRegister with metrics.RegisterPrometheusCollectors * Apply suggestions from code review Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com> --------- Signed-off-by: Tiago Silva <tiago.silva@goteleport.com> Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>