[Feature Request] Option to disable metrics in server start-dev
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 67/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go, prometheus
- 領域
- cli, observability
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 390
- フォーク
- 123
- 平均マージ
- 2日 9時間
- マージ済み PR(30日)
- 13
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
temporalio/cli のほかの issue
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
temporalio/cli#776 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
temporalio/cli#1249 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Feature Request] Decode workflow histories concurrently with remote codec servers対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンenhancement
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
temporalio/cli#1193 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
temporalio/cli#1178 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
temporalio/cli#1098 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
seriousm4x/UpSnap#1786 ·
-
bug feedback ui/ux
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
peasant-labs/peasant#1307 ·
メンテナーはふだん 1 日以内に返信
-
Reformat test names for single-protocol tests to start with Protocol/, i.e. gRPC/ or Websocket/オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
connectrpc/conformance#1211 ·
メンテナーはふだん 1 日以内に返信
-
bug effort:s impact:med raised-by:desk risk:low
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
medici-finance/assay#8342 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
hardening
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
inference-sim/inference-sim#2821 ·
メンテナーはふだん 1 日以内に返信