feat: add OpenTelemetry tracing support for CI/CD observability
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- go
- Bereich
- cli, distributed-systems, observability
Rechercherichtung
Beginne mit dem Lesen von cmd/root.go und des Connector-Codes unter pkg/connectors, und prüfe anschließend den vorgeschlagenen Einstiegspunkt pkg/observability/tracing.go sowie die Anforderungen an die OTel-HTTP-Instrumentierung. Die Aufgabe ist abgeschlossen, wenn das Tracing über OTEL_EXPORTER_OTLP_ENDPOINT opt-in erfolgt, die aufgeführten Test-, Poll- und Upload-Operationen Spans erzeugen, ausgehende Requests traceparent-Header übertragen und das bestehende Verhalten unverändert bleibt, wenn die Variable nicht vorhanden ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Go
- Sterne
- 59
- Forks
- 75
- Ø Merge
- 4 T. 5 Std.
- Gemergte PRs (30 T.)
- 15
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microcks/microcks-cli
-
Logging into a locally started instance clears its container reference, causing stop to do nothingOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
microcks/microcks-cli#620 ·
Maintainer antworten meist innerhalb von 1 Tag
-
WatchConfig.UpsertEntry silently deletes existing contexts when re-upserting a watched fileEvtl. vergeben @aryarathoree hat das vor 1 Tag übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
microcks/microcks-cli#610 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug: microcks test get swallows test failure details and operation results in text output modeOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
microcks/microcks-cli#608 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
KeycloakClient strips realm path when realm URL lacks trailing slashEvtl. vergeben @aryarathoree hat das vor 1 Tag übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
microcks/microcks-cli#606 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Windows test failures in MockFileSystem.Walk due to path separatorEvtl. vergeben @dipak0000812 hat das vor 5 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
microcks/microcks-cli#601 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in microcks/microcks-cli
Ähnliche Issues
-
Cluster details: the Control Plane version field has a different border color than its icon boxOffenkind/design sig/ui
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
kubermatic/dashboard#8449 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
filecoin-project/curio#1632 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
-
compose: derived node options overwrite each other's targetsEvtl. vergeben @yangjj-iso hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag