elastic / elastic/ecs-logging-python

how to prefix structlog log value with "custom." or route them to a certain ecs field

Đang mở
#52 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
agent-python
Ngôn ngữ chính
Python
Star
74
Fork
33
Merge trung bình
9 giờ 3 phút
Pull request đã merge (30 ngày)
1

Mô tả

Hi,
according to the ecs documentation non ecs standard fields should go under "custom."
Also I might log data that should go to a certain ecs field

but i'm not sure how to configure something like this in structlog/ecs-logging.

for example this:
```python
req_id = uuid()
...
logger.info("something happend", foo="123", request_id=req_id)

```
should end up being something like this:
```json
{
"http.request.id" : "",
"message": "something happend",
"custom.foo" : 123
...
}
```

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

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.