[Feature Request] Option to disable metrics in server start-dev
Maintainer thường phản hồi trong vòng 1 ngà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
- 67/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go, prometheus
- Lĩnh vực
- cli, observability
Hướng nghiên cứu
Start with internal/temporalcli/commands.server.go around the metrics port selection and internal/devserver/server.go around buildServerConfig, where the issue says metrics are configured. Check the startup banner code that prints the Temporal Metrics endpoint. Add a supported way to disable metrics and confirm startup skips Prometheus configuration and reports the disabled state or omits the endpoint.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
There's no way to run temporal server start-dev without Prometheus metrics. If --metrics-port is omitted, the CLI picks a free port (commands.server.go#L147-L154), so MetricsPort is always > 0 when it reaches buildServerConfig, and metrics are always configured (server.go#L272). Passing a non-positive value fails: can't set metrics port -1: listen tcp: address -1: invalid port.
This matters when the dev server backs a test suite that creates many short-lived namespaces (one or two per test, so tests are isolated). The metric registry keeps a set of series for every namespace, task queue and partition it has seen, and never drops them, even after the namespace is deleted. On CLI 1.9.1 (server 1.32.0), one run of a ~100-test suite left about 1.3M series and 212 namespace label values. The dev server's memory grew by about 1.6 GiB per run and was OOM-killed on the third run in a long-lived container.
Running temporalio/server:1.32.0 with a config that has no global.metrics section, plus the same dynamic config settings, cut growth by about 450 MiB per run compared with the dev server. That's because the server falls back to metrics.NoopMetricsHandler when Global.Metrics is nil. But it means writing and maintaining a full server config just to drop metrics.
Describe the solution you'd like
A way to turn metrics off in server start-dev, for example:
- a
--disable-metricsflag, or --metrics-port 0(or a negative value) meaning "no metrics", if changing the meaning of 0 is acceptable.
Either one would leave MetricsPort at 0, so the existing check at server.go#L272 skips the Prometheus config. The startup banner would then print nothing (or "disabled") for Temporal Metrics.
Additional context
- #309 added printing of the auto-picked metrics port. As far as I can tell, there's no existing request to turn metrics off.
- The same option would help
testsuite.StartDevServerusers in the Go SDK, which runs this CLI: they could pass the flag throughExtraArgs.
- Ngôn ngữ chính
- Go
- Star
- 390
- Fork
- 123
- Merge trung bình
- 2 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- 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 temporalio/cli
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
temporalio/cli#776 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
temporalio/cli#1249 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature Request] Decode workflow histories concurrently with remote codec serversCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 65/100
temporalio/cli#1193 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
temporalio/cli#1178 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
temporalio/cli#1098 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của temporalio/cli
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
seriousm4x/UpSnap#1786 ·
-
bug feedback ui/ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
peasant-labs/peasant#1307 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Reformat test names for single-protocol tests to start with Protocol/, i.e. gRPC/ or Websocket/Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
connectrpc/conformance#1211 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug effort:s impact:med raised-by:desk risk:low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
medici-finance/assay#8342 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
hardening
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
inference-sim/inference-sim#2821 ·
Maintainer thường phản hồi trong vòng 1 ngày