Feature Request: Allow relativeCreated to be formatted as seconds instead of milliseconds
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
- 42/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- observability-sre
Hướng nghiên cứu
Bắt đầu bằng cách đọc FluentRecordFormatter và thuộc tính relativeCreated của LogRecord trong Python để hiểu cách các trường của formatter được phân giải. Tính năng hoàn tất khi một trường relativeCreatedInSeconds có thể được sử dụng trong cấu hình được hiển thị và tạo ra thời gian tạo tương đối tính bằng giây.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Python LogRecord has the attribute relativeCreated
Time in milliseconds when the LogRecord was created, relative to the time the logging module was loaded.
It's currently possible to use FluentRecordFormatter to include that in the fluent events
version: 1
formatters:
fluent_fmt:
'()': fluent.handler.FluentRecordFormatter
format:
"host.hostname": '%(hostname)s'
"host.id": '%(hostname)s'
"host.uptime": '%(relativeCreated)d'
"log.logger": '%(name)s'
"log.level": '%(levelname)s'
"log.origin.file.name": '%(pathname)s'
"log.origin.file.line": '%(lineno)d'
"log.origin.function": '%(funcName)s'
but relativeCreated is in milliseconds, it would be very convenient to be able to convert that to seconds right in FluentRecordFormatter hence this feature request, please considering allowing something like
"host.uptime": '%(relativeCreatedInSeconds)d'
were the relativeCreatedInSeconds would be something added by FluentRecordFormatter.
- Ngôn ngữ chính
- Python
- Star
- 457
- Fork
- 138
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 fluent/fluent-logger-python
-
support of `asctime` Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
fluent/fluent-logger-python#210 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
fluent/fluent-logger-python#196 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
fluent/fluent-logger-python#194 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
fluent/fluent-logger-python#193 · 3 bình luận ·
-
Formatting message does not work Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
fluent/fluent-logger-python#190 ·
Tất cả issue của fluent/fluent-logger-python
Issue tương tự
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/cloudstack#14222 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100