feat: add OpenTelemetry tracing support for CI/CD observability
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- go
調査の方向性
まず cmd/root.go と pkg/connectors 配下の connector コードを読み、次に提案されているエントリポイント pkg/observability/tracing.go と OTel HTTP instrumentation の要件を確認します。OTEL_EXPORTER_OTLP_ENDPOINT によって tracing が opt-in になり、一覧にある test、poll、upload 操作が span を出力し、送信リクエストに traceparent ヘッダーが付与され、変数が存在しない場合も既存の動作が変わらなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Reason/Context
When microcks test fails in a CI/CD pipeline, platform engineers have no way to correlate the CLI execution with what happened on the Microcks server or the API under test. The CLI is a complete black box — no trace context, no span data, no correlation IDs in logs.
Modern platform teams run observability stacks (Grafana/Tempo, Jaeger, Datadog) and expect every tool in their pipeline to emit trace context. Without it, debugging a failed API test requires manually cross-referencing timestamps across multiple systems.
Since Microcks is a CNCF Sandbox project, adding OTel tracing aligns directly with CNCF's observability principles and makes Microcks significantly more attractive to enterprise platform teams who already run OTel collectors in their infrastructure.
Description
Add opt-in OpenTelemetry (OTel) distributed tracing to microcks-cli so engineers can trace a full test lifecycle from CLI invocation → Microcks server → target API endpoint.
Activation: via standard OTel environment variable — OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4317
- If the env var is absent → zero overhead, zero behavior change, no new output
- If set → CLI initializes an OTLP exporter and emits spans for key operations
Spans emitted:
microcks.test.create— when a test result is created on the servermicrocks.test.poll— each polling iteration waiting for test completionmicrocks.import.upload— when an artifact is uploaded
W3C Trace Context: injects traceparent headers into all outgoing HTTP requests so the Microcks server can participate in the same trace.
This is a non-breaking change. Fully opt-in via environment variable. Existing users see zero difference unless they explicitly set the OTLP endpoint.
Implementation ideas
New package pkg/observability/tracing.go — initializes the OTel provider and returns a shutdown function:
func InitTracer(serviceName string) (func(context.Context) error, error) {
// reads OTEL_EXPORTER_OTLP_ENDPOINT from env
// returns no-op tracer if unset
}
Wire into `cmd/root.go` PersistentPreRun — initialize once, shutdown in PersistentPostRun.
Wrap the HTTP client in `pkg/connectors/` using `otelhttp.NewTransport`:
Dependencies to add:
- go.opentelemetry.io/otel (CNCF graduated project)
- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
Fully opt-in — no Kubernetes or external collector required. Works with any OTLP-compatible backend (Jaeger, Tempo, Datadog). Happy to implement if the approach looks good.
- 主要言語
- Go
- スター
- 59
- フォーク
- 75
- 平均マージ
- 4日 5時間
- マージ済み PR(30日)
- 15
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microcks/microcks-cli のほかの issue
-
Logging into a locally started instance clears its container reference, causing stop to do nothingオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
microcks/microcks-cli#620 ·
メンテナーはふだん 1 日以内に返信
-
WatchConfig.UpsertEntry silently deletes existing contexts when re-upserting a watched file対応中かも @aryarathoree が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microcks/microcks-cli#610 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
microcks/microcks-cli#608 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
KeycloakClient strips realm path when realm URL lacks trailing slash対応中かも @aryarathoree が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
microcks/microcks-cli#606 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Windows test failures in MockFileSystem.Walk due to path separator対応中かも @dipak0000812 が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microcks/microcks-cli#601 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
microcks/microcks-cli の issue をすべて見る
似ている issue
-
agent-butler-finding bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
jordansmall/spindrift#6414 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Icinga/icinga-kubernetes#294 ·
メンテナーはふだん 4 日以内に返信
-
Cluster details: the Control Plane version field has a different border color than its icon boxオープンkind/design sig/ui
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
kubermatic/dashboard#8449 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
filecoin-project/curio#1632 ·
メンテナーはふだん 1 日以内に返信