Bỏ qua

✅ Observability Setup - HOÀN THÀNH!

🎉 Tóm tắt

Đã fix thành công:

  1. ✅ ClickHouse connection string (path-style /signoz)
  2. ✅ Tạo bảng thủ công cho single-node ClickHouse
  3. ✅ Thêm các columns còn thiếu
  4. ✅ Recreate distributed tables
  5. ✅ OTEL Collector có thể ghi data

📊 Tables đã được tạo

signoz_traces (8 bảng):

  • signoz_index_v3 + distributed_signoz_index_v3
  • signoz_error_index_v2 + distributed_signoz_error_index_v2
  • span_attributes_keys + distributed_span_attributes_keys
  • tag_attributes_v2 + distributed_tag_attributes_v2

signoz_metrics (6 bảng):

  • samples_v4 + distributed_samples_v4 (có column flags)
  • time_series_v4 + distributed_time_series_v4 (có column description)
  • metadata + distributed_metadata (có column type)

🚀 Bước tiếp theo - Kiểm tra data

1. Tạo traffic

# Gửi requests đến services
curl http://localhost:3000/health

# Hoặc nhiều requests
for i in {1..20}; do
  curl http://localhost:3000/health
  sleep 0.5
done

2. Kiểm tra trong Signoz UI

  1. Mở: http://localhost:3301
  2. Đăng nhập (hoặc tạo account)
  3. Vào Traces:
  4. Time range: "Last 15 minutes"
  5. Đợi 30-60 giây
  6. Bạn nên thấy traces! 🎉

  7. Vào Metrics:

  8. Time range: "Last 15 minutes"
  9. Query metrics
  10. Bạn nên thấy metrics! 🎉

3. Verify data trong ClickHouse

# Kiểm tra traces
docker exec football-booking-backend-boilerplate-clickhouse-1 \
  clickhouse-client --password clickhouse123 \
  --query "SELECT count() FROM signoz_traces.distributed_signoz_index_v3"

# Kiểm tra metrics
docker exec football-booking-backend-boilerplate-clickhouse-1 \
  clickhouse-client --password clickhouse123 \
  --query "SELECT count() FROM signoz_metrics.distributed_samples_v4"

Nếu count > 0 → ✅ Data đã được lưu!

✅ Checklist cuối cùng

  • [x] ClickHouse tables đã được tạo (đầy đủ)
  • [x] Columns đã được thêm
  • [x] Distributed tables đã được recreate
  • [x] OTEL Collector đã restart
  • [ ] Services đang chạy (yarn dev)
  • [ ] Đã tạo traffic
  • [ ] Đã kiểm tra Signoz UITHẤY DATA! 🎉

🔍 Verify Collector không còn lỗi

# Kiểm tra logs - không nên còn lỗi "Table does not exist" hoặc "No such column"
docker logs --tail 30 football-booking-backend-boilerplate-signoz-otel-collector-1 | grep -i "error.*table\|error.*column"

# Nếu không có output → ✅ Không còn lỗi!

📝 Scripts đã tạo

  • scripts/create-signoz-tables-manual.sh - Tạo bảng thủ công (đã update với đầy đủ schema)
  • scripts/fix-observability.sh - Script fix tổng hợp

🎯 Kết luận

Setup đã hoàn tất! Bây giờ bạn chỉ cần:

  1. Start services (yarn dev)
  2. Tạo traffic
  3. Kiểm tra Signoz UI → Sẽ thấy data!

📚 Tài liệu

  • docs/OBSERVABILITY-SUCCESS.md - Tài liệu này
  • docs/OBSERVABILITY-SUMMARY.md - Tóm tắt
  • docs/OBSERVABILITY-FIX-GUIDE.md - Fix guide