Skip to content

04-可观测性建设

本讲为十二期第四阶段,聚焦 Metrics、Tracing、Logging 三位一体的可观测性体系。

核心内容

  • 监控体系:Prometheus + Grafana
  • 链路追踪:OpenTelemetry、Jaeger
  • 日志中心:ELK、Loki
  • SLO 与告警治理
yaml
# Prometheus 抓取配置示例
scrape_configs:
  - job_name: 'java-senior-app'
    metrics_path: '/actuator/prometheus'
    static_configs:
      - targets: ['app:8080']
    relabel_configs:
      - source_labels: [__address__]
        target_label: instance
        replacement: 'java-senior-prod'