Evaluate reuse of machinery's OpenTelemetry log export to complete native OTEL support (logs, metrics, traces)
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go, grpc
- Lĩnh vực
- backend, observability
Hướng nghiên cứu
Start by reading Klio's core/internal/opentelemetry and its logging setup that uses machinery's Flags.ConfigureLogging. Review the open machinery#343 PR to see the proposed WithOpenTelemetry API. The deliverable is a written conclusion in this issue and a comment on machinery#343 before merge; if reusable, a bump PR with unit tests and docs.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
Klio already exports metrics and traces via OpenTelemetry (core/internal/opentelemetry), enabled by the standard OTEL_* environment variables. Logs are the missing signal: they only go to stdout/stderr, so collecting them still requires a node-level DaemonSet or a sidecar.
CloudNativePG hit the same limitation and tracked it in cloudnative-pg/cloudnative-pg#11085 ("Support Otel Log streaming w/o daemonset"). The framework to address it landed in the shared logging library as cloudnative-pg/machinery#343 ("feat(log): export the log records via OpenTelemetry"). Klio already depends on github.com/cloudnative-pg/machinery (currently v0.6.1) for its logging, so it is a natural candidate for reuse.
Note that machinery#343 has not been merged yet, and it should not be merged until Klio confirms that the framework works for it too. Klio is therefore a gating consumer: this evaluation should run against the open PR, and any change Klio needs should be raised on the PR before it lands, not as a follow-up that would force an API change in a released machinery version.
What machinery#343 introduces
From the open PR (to be confirmed against the final code, as the API may still change):
- An optional
WithOpenTelemetry()argument toFlags.ConfigureLogging. - Activation via the standard
OTEL_EXPORTER_OTLP_ENDPOINT/OTEL_EXPORTER_OTLP_LOGS_ENDPOINTvariables. Protocol ishttp/protobufunlessgrpcis requested. - A zap core teed with the existing core, inside the duplicate-message sampler, so stdout and OTLP receive the same records at the same level. The log destination is unchanged.
- Structured fields are exported as attributes using the same keys as the JSON output. The custom debug and trace levels map to DEBUG severity.
- Batched background export, dropping records rather than blocking when the collector falls behind.
ShutdownOpenTelemetryto flush queued records before exit.ForwardToOpenTelemetry, which exports JSON records written by spawned processes while preserving their original time, level and logger name.
Goal
Verify whether this framework can be reused as is by Klio, so that logs, metrics and traces are all exported natively through OTEL, with no DaemonSet or sidecar needed for any of the three signals.
Out of scope
- Redesigning the existing metrics catalogue or tracing spans.
- Any change to the stdout log format.
Acceptance criteria
- A written conclusion (in this issue or a short design note) on whether machinery's framework is reusable as is, or which upstream changes are needed.
- An explicit confirmation (or list of blocking concerns) posted on cloudnative-pg/machinery#343 before it is merged.
- If reusable: a follow-up PR bumping machinery to the release containing the change, enabling log export behind the existing
OTEL_*configuration, with unit coverage and an e2e or manual verification against an OTel Collector. - Docs showing a single configuration that enables logs, metrics and traces together.
Related
- cloudnative-pg/machinery#343 (open, not to be merged until Klio confirms compatibility)
- cloudnative-pg/cloudnative-pg#11085
- cloudnative-pg/cloudnative-pg#11783 (CloudNativePG side of the integration, as referenced by the machinery PR)
- Ngôn ngữ chính
- Go
- Star
- 39
- Fork
- 10
- Merge trung bình
- 19 giờ 58 phút
- Pull request đã merge (30 ngày)
- 175
Chuẩn bị môi trường
- 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 cloudnative-pg/klio
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
cloudnative-pg/klio#611 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DLQ activity is not observable through metricsCó thể đã có người làm @gabriele-wolfox đã nhận 1 ngày trước. Đang mở
cloudnative-pg/klio#610 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Tier1 WAL retention can delete WALs not yet relayed to tier2Có thể đã có người làm @gabriele-wolfox đã nhận 5 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
cloudnative-pg/klio#578 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Replace OLM catalog managementCó thể đã có người làm @jbattiato đã nhận 7 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
cloudnative-pg/klio#526 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
cloudnative-pg/klio#525 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cloudnative-pg/klio
Issue tương tự
-
GitHub webhook is not subscribed to release events, so `event: release` never triggersCó thể đã có người làm @qsun đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
woodpecker-ci/woodpecker#7542 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
zilliztech/milvus-backup#1386 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Pipelined flush no longer observes kill signals after #2042: flush backoffer is built with nil varsĐang mở
Độ 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
-
model:sonnet runtime:claude security size:S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
FootprintAI/Containarium#3624 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày