Add telemetry counter for Redis pub/sub reconnection attempts
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- php, redis
- Lĩnh vực
- backend, observability
Hướng nghiên cứu
Bắt đầu trong app/realtime.php, đọc các đăng ký telemetry quanh dòng 398-400 và khối catch của pub/sub connection-error quanh dòng 616. Làm theo các mẫu đăng ký và sử dụng counter hiện có; công việc hoàn tất khi pubsub.reconnection được đăng ký trong onWorkerStart và được tăng một lần cho mỗi lần thử kết nối lại được xử lý.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🔖 Enhancement description
Add a telemetry counter telemetry.pubsubReconnectionCounter in app/realtime.php to track Redis pub/sub connection reconnection attempts. The counter will be incremented in the catch block that handles pub/sub connection errors (around line 616).
🎤 Pitch
Realtime functionality depends entirely on Redis pub/sub for message distribution. When pub/sub connections fail, the system automatically retries, but there's currently no metric to monitor the frequency or pattern of these reconnections.
This enhancement provides:
- Infrastructure visibility: Operators can detect Redis instability before it impacts users
- Alerting capability: Spikes in reconnection attempts can trigger infrastructure alerts
- Low overhead: Single counter increment per failed connection attempt
- Consistent pattern: Follows existing telemetry patterns already in the file (lines 398-400 show telemetry.connectionCounter, telemetry.connectionCreatedCounter, and telemetry.messageSentCounter)
Implementation follows existing patterns:
The file already uses this telemetry pattern:
- Registration (around line 400):
php
$register->set('telemetry.connectionCounter', fn () => $telemetry->createUpDownCounter('realtime.server.open_connections'));
$register->set('telemetry.connectionCreatedCounter', fn () => $telemetry->createCounter('realtime.server.connection.created'));
$register->set('telemetry.messageSentCounter', fn () => $telemetry->createCounter('realtime.server.message.sent'));
Usage throughout the file:
php
$register->get('telemetry.connectionCounter')->add(1);
$register->get('telemetry.connectionCreatedCounter')->add(1);
$register->get('telemetry.messageSentCounter')->add($total);
The proposed change follows this exact pattern:
- Register the counter in onWorkerStart: $register->set('telemetry.pubsubReconnectionCounter', fn () => $telemetry->createCounter('realtime.server.pubsub.reconnection'));
- Increment it in the catch block: $register->get('telemetry.pubsubReconnectionCounter')->add(1);
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
- Ngôn ngữ chính
- PHP
- Star
- 57.5k
- Fork
- 5.8k
- Merge trung bình
- 18 giờ 45 phút
- Pull request đã merge (30 ngày)
- 384
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của appwrite/appwrite
-
product / databases product / functions product / storage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
appwrite/appwrite#14007 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
product / avatars product / self-hosted product / storage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
appwrite/appwrite#13985 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
product / databases product / self-hosted product / sites product / storage product / vcs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
appwrite/appwrite#12786 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
product / databases product / sites
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
appwrite/appwrite#11657 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix redis/redisinsight image tagĐang mởproduct / storage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
appwrite/appwrite#11612 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của appwrite/appwrite
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
rap2hpoutre/fast-excel#425 ·
-
bug Medium Priority
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Перевод устарел
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100