tencent cloud

Tencent Cloud Distributed Cache (Redis OSS-Compatible)

Release Notes and Announcements
Release Notes
Announcements
User Tutorial
Product Introduction
Overview
Product Strengths
Use Cases
Storage Engine
Product Series
Product Versions
Specifications and Performance
Read/Write Separation
Multi-AZ Deployment
Regions and AZs
Terms
Service Regions and Service Providers
Purchase Guide
Billing Overview
Pricing Center
Instance Purchasing
Renewal (Yearly/Monthly Subscription)
Refund (Yearly/Monthly Subscription)
Overdue Payments
Switching from Pay-as-You-Go to Yearly/Monthly Subscription
Getting Started
Quickly Creating an Instance
Connecting to Redis Instance
Operation Guide
Operation Overview
Connecting to a Database Instance
Managing Instances
Upgrade Instance
Management Node (Redis/ValKey Edition)
Multi-AZ Deployment Management
Backup and Restoration
Managing Accounts
Parameter Configuration
Slow Query
Access Management
Network and Security
Monitoring and Alarms
Event Management (Redis/ValKey Edition)
Data Migration
Global Replication for Redis Edition
Database Audit
Performance Optimization
Sentinel Mode
Development Guidelines
Naming Rules
Basic Usage Guidelines
Design Principles of Key and Value
Command Usage Guidelines
Design Principles of Client Programs
Connection Pool Configuration
Command Reference
Command Reference Overview
Redis Edition and Valkey Edition Command Compatibility
Version Command Usage Differences
Differences Between the Proxy Architecture and Direct Connection Mode
More Command Operations (Redis/Valkey Edition)
Memcached Edition Command Compatibility
Practical Tutorial
Building TencentDB for Redis® Client Monitoring Based on Spring Boot
Redis Client Connection Configuration Policy and Practice
Global SCAN Guide for Cluster Architecture
Eliminating Instances Securely
Hot Key and Big Key
AZ Migration Scheme
Troubleshooting
Connection Exception
Exception Analysis and Solution of Redisson Client Timeout Reconnection
Performance Troubleshooting and Fine-Tuning
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Parameter Management APIs
Other APIs
Backup and Restoration APIs
Region APIs
Monitoring and Management APIs
Log APIs
Data Types
Error Codes
FAQs
General
Connection and Login
Purchase
Service Agreement
Service Level Agreement
Terms of Service
Glossary
Contact Us

Using Spring Boot Actuator to Collect TencentDB for Redis® Performance Data

PDF
Focus Mode
Font Size
Last updated: 2026-03-17 18:23:47
Spring Boot Actuator is a tool provided by Spring Boot for monitoring and managing Spring Boot applications. It exposes runtime information about the application through a series of predefined endpoints, including health status, configuration properties, measurement metrics, and thread dumps. These endpoints can be accessed through HTTP APIs or Java Management Extensions (JMX), assisting developers and Ops personnel in quickly understanding the operation status of applications and performing troubleshooting and performance optimization. This practice tutorial introduces how to expose latency data through Spring Boot Actuator and use monitoring components such as Prometheus and Grafana to monitor the TencentDB for Redis® command latency from the client.

Configuring the Spring Boot Actuator Component Dependency

Actuator is deeply integrated with Spring Boot and ready to use. Just introduce the Spring Boot Actuator dependency to the `pom.xml` file of the project, as shown below.
<!-- Spring Boot Actuator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>2.4.1</version>
</dependency>

<!-- Micrometer Prometheus Registry -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>

Configuring Exposing Endpoints

In Spring Boot 2.x and later versions, when Spring Data Redis and the Lettuce client are used, Lettuce is automatically integrated with Micrometer and starts collecting metrics. If the Actuator dependency is introduced, simply expose the `metrics` and `prometheus` endpoints in the configuration file to complete the monitoring and exposure of Lettuce metrics. Add the endpoints to be exposed in the configuration file application.properties of the project, as shown below.
/actuator/health: displays the overall health status of the application. Customizing the health metrics is supported.
/actuator/info: displays custom application information such as version and description.
/actuator/metrics: provides various running metrics such as memory, CPU, and HTTP request statistics.
/actuator/prometheus: exposes monitoring data to Prometheus. Prometheus can periodically capture measurement metrics applied in Spring Boot.
management.endpoints.web.exposure.include=health,info,metrics,prometheus

Using CURL to Pull Endpoint Data

Pull the metrics endpoint by running the `curl` command to view the performance metrics reported by Lettuce.

Make a request to the Prometheus endpoint by running the `curl` command to view the data reported in the Prometheus format. Due to the large data volume, the following example filters the results to display only the metric data related to Lettuce.


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback