Add typed methods for Load Balancing Analytics Events and Pool Health endpoints
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 58/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Bắt đầu với các REST endpoint đã được tài liệu hóa và các điểm vào của client load_balancers.analytics.events.list và load_balancers.pools.health.get, sau đó so sánh với các tài nguyên SDK có kiểu gần đó. Được xem là hoàn thành khi cả hai endpoint đều khả dụng thông qua các phương thức có kiểu và cung cấp các trường event và health theo từng origin đã được tài liệu hóa, thay vì yêu cầu with_raw_response.get().
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Feature Request
The Python SDK is missing typed methods for two Load Balancing endpoints that are documented in the Cloudflare REST API:
1. Load Balancing Analytics Events
REST endpoint: GET /accounts/{account_id}/load_balancing_analytics/events
Returns per-origin health state change events with timestamps, pool health status, failure reasons, and response codes. This is critical for monitoring when individual origins go unhealthy.
Current workaround:
resp = client.with_raw_response.get(
f"/accounts/{account_id}/load_balancing_analytics/events",
cast_to=object,
options={"params": {"per_page": 200, "page": 1, "since": "...", "until": "..."}}
)
data = resp.json()
Desired:
events = client.load_balancers.analytics.events.list(
account_id=account_id,
since="2026-03-18T00:00:00Z",
until="2026-03-18T23:59:59Z",
)
2. Pool Health Details
REST endpoint: GET /accounts/{account_id}/load_balancers/pools/{pool_id}/health
Returns per-PoP, per-origin health status including response codes, RTT, and failure reasons. Useful for diagnosing which specific origins are failing and from which regions.
Current workaround:
resp = client.with_raw_response.get(
f"/accounts/{account_id}/load_balancers/pools/{pool_id}/health",
cast_to=object,
)
data = resp.json()
Desired:
health = client.load_balancers.pools.health.get(
pool_id=pool_id,
account_id=account_id,
)
Use Case
We built an origin health monitor that detects when individual load balancer origins are unhealthy while the pool remains healthy (silent degradation / lost redundancy). Both endpoints are essential for this use case and are documented in the Cloudflare API docs, but require falling back to raw HTTP via with_raw_response.get().
References
- Ngôn ngữ chính
- Python
- Star
- 509
- Fork
- 150
- Merge trung bình
- 3 giờ 15 phút
- Pull request đã merge (30 ngày)
- 1
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 cloudflare/cloudflare-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
cloudflare/cloudflare-python#2747 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
cloudflare/cloudflare-python#2718 · 1 bình luận ·
-
`client.pages.projects.list` returns a paginated list of `Deployment`s instead of `Project`s Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
cloudflare/cloudflare-python#2692 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
cloudflare/cloudflare-python#2679 · 4 bình luận · 5 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
cloudflare/cloudflare-python#2745 · 1 bình luận ·
Tất cả issue của cloudflare/cloudflare-python
Issue tương tự
-
essnmx good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
-
[Feature] 奇物选择添加优先级 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
syfoud/Simulated_Scepter#174 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Giskard-AI/giskard-oss#2840 · 1 bình luận ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Đang mởarea: repo bug perceived difficulty: 2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
yeti-platform/yeti#1380 ·