HeartbeatPlugin ignores heartbeat intervals with a seconds component under 30 (uses TimeSpan.Seconds instead of TotalSeconds)
Maintainer thường phản hồi trong vòng 6 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
Hướng nghiên cứu
Đọc src/Exceptionless/Plugins/Default/100_HeartbeatPlugin.cs, đặc biệt là phần xác thực khoảng thời gian ở dòng 16–18; issue chỉ ra phép kiểm tra TimeSpan.Seconds bị lỗi và đề xuất so sánh tổng số giây hoặc một TimeSpan. Kiểm tra việc chuyển tiếp UseSessions trong src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs và thêm hoặc tìm một bài kiểm tra cho các khoảng thời gian dưới và trên 30 giây. Hoàn thành khi các khoảng thời gian từ 30 giây trở lên được giữ nguyên, còn các khoảng ngắn hơn sử dụng mặc định một phút.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In Exceptionless 6.2.0 (core Exceptionless package), HeartbeatPlugin validates the configured interval with interval.Value.Seconds >= 30. TimeSpan.Seconds is only the 0-59 seconds component, so most whole-minute intervals are rejected and silently replaced with the 1 minute default.
Where
- https://github.com/exceptionless/Exceptionless.Net/blob/5792f00d175f94a35fe0559c8e9999234a8163be/src/Exceptionless/Plugins/Default/100_HeartbeatPlugin.cs#L16-L18
- https://github.com/exceptionless/Exceptionless.Net/blob/5792f00d175f94a35fe0559c8e9999234a8163be/src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs#L111-L121 (
UseSessions(heartbeatInterval: ...)passes the value through)
What happens
| Requested interval | .Seconds |
Interval used |
|---|---|---|
TimeSpan.FromSeconds(45) |
45 | 45 seconds |
TimeSpan.FromSeconds(90) |
30 | 90 seconds |
TimeSpan.FromSeconds(75) |
15 | 1 minute |
TimeSpan.FromMinutes(2) |
0 | 1 minute |
TimeSpan.FromMinutes(5) |
0 | 1 minute |
Any interval that is a whole number of minutes falls back to 1 minute, so config.UseSessions(heartbeatInterval: TimeSpan.FromMinutes(5)) sends heartbeats every minute instead of every 5 minutes.
Expected
Intervals of 30 seconds or more are honored; only intervals under 30 seconds fall back to the default.
With the 6.2.0 package, new HeartbeatPlugin(TimeSpan.FromMinutes(5)) stores an interval of 00:01:00, while new HeartbeatPlugin(TimeSpan.FromSeconds(90)) stores 00:01:30.
Steps to reproduce
config.UseSessions(heartbeatInterval: TimeSpan.FromMinutes(5));- Set a user identity and submit an event to start a session.
- Session heartbeat events are sent every minute, not every 5 minutes.
Suggested fix
Use interval.Value.TotalSeconds >= 30 (or interval.Value >= TimeSpan.FromSeconds(30)).
- Ngôn ngữ chính
- C#
- Star
- 573
- Fork
- 143
- Merge trung bình
- 5 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không 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 exceptionless/Exceptionless.Net
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
exceptionless/Exceptionless.Net#391 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
exceptionless/Exceptionless.Net#390 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
AWS Lambda detection never matches because the environment variable name has a trailing spaceĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
exceptionless/Exceptionless.Net#386 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
exceptionless/Exceptionless.Net#389 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
exceptionless/Exceptionless.Net#388 ·
Maintainer thường phản hồi trong vòng 6 ngày
Tất cả issue của exceptionless/Exceptionless.Net
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Độ 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
-
Street address filter matches across line breaks and reads "Dr." in a greeting as a street suffixĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
philterd/phileas-dotnet#185 ·
-
[Bug] Dashboard renders attachment links that resolve to 404 when the FILES binding is absentĐang mởbug 優先: 低
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100