${title}

监控中间件已启用,所有业务路由的请求都会被自动采集

可观测端点

% for endpoint in endpoints: % endfor
路径 说明
${endpoint['path']} ${endpoint['desc']}

核心指标

  • litefs_http_requests_total —— 请求总数
  • litefs_http_errors_total —— 错误响应总数
  • litefs_http_request_duration_seconds —— 请求耗时直方图
  • litefs_http_response_size_bytes —— 响应体大小直方图
  • litefs_db_pool_connections —— 数据库连接池状态
  • litefs_cache_operations_total —— 缓存命中/未命中计数
  • litefs_cache_entries —— 缓存条目数量

快速验证

curl http://localhost:8083/api/items/1
curl http://localhost:8083/api/cache/demo
curl http://localhost:8083/metrics