elastic / elastic/ecs-logging-java

Namespace MDC Fields with either labels or tags.

Đang mở
#142 19 bình luận 1 reaction 0 người được giao Xem trên GitHub
8.8-candidate agent-java community
Ngôn ngữ chính
Java
Star
148
Fork
82
Merge trung bình
2 ngày 17 giờ
Pull request đã merge (30 ngày)
3

Mô tả

I noticed when I was working with the ECS Java loggers that MDC and/or Metadata fields weren't name spaced.

I can see one of three scenario's:

1. Make the default namespace be `labels` per [https://www.elastic.co/guide/en/ecs/current/ecs-base.html](Base Fields)
2. Make the default namespace be `tags` per [https://www.elastic.co/guide/en/ecs/current/ecs-base.html](Base Fields)
3. Allow for a customized namespace via a configuration parameter.

Here's an example configuration:

```xml



my-application
my-application-cluster-node

environment
dev




```

and a resulting output:

```json
{
"@timestamp": "2021-08-31T15:57:11.355Z",
"log.level": "DEBUG",
"message": "Example with the default Meta Data fields.",
"ecs.version": "1.2.0",
"service.name": "my-application",
"service.node.name": "my-application-cluster-node",
"event.dataset": "my-application.log",
"process.thread.name": "main",
"log.logger": "co.elastic.DemoApplication",
"environment": "dev"
}
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu từ cấu hình logback EcsEncoder và kiểm tra cách các trường MDC và Metadata được phát ra. So sánh cấu trúc JSON hiện tại với các phương án thay thế labels và tags của ECS, sau đó xác định liệu triển khai nên sử dụng một namespace mặc định hay cung cấp một namespace có thể cấu hình. Hoàn tất khi hành vi của namespace đã được thống nhất và đầu ra ví dụ phản ánh điều đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
observability-sre
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

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.