Skip to content

feat: add OpenTelemetry tracing support - #421

Draft
miyunari wants to merge 1 commit into
mainfrom
tracing
Draft

feat: add OpenTelemetry tracing support#421
miyunari wants to merge 1 commit into
mainfrom
tracing

Conversation

@miyunari

Copy link
Copy Markdown

Summary

  • Add OpenTelemetry tracing with OTLP gRPC exporter
  • New CLI flags: --tracing-enabled, --tracing-endpoint, --tracing-insecure, --tracing-stdout
  • HTTP handler wrapped with otelhttp.NewHandler for automatic span creation
  • gRPC servers instrumented with otelgrpc.NewServerHandler() (main, legacy, and duplex)
  • Outbound CT log HTTP client transport wrapped with otelhttp.NewTransport
  • Uses shared tracing library from sigstore/model-validation-operator/pkg/tracing

Changes

  • cmd/app/serve.go: Add tracing flags, init, and CT log transport wrapping
  • cmd/app/grpc.go: Add otelgrpc to main and legacy gRPC servers
  • cmd/app/http.go: Wrap HTTP handler with otelhttp
  • go.mod/go.sum: Add tracing dependencies

Test plan

  • Verify build passes
  • Deploy with --tracing-enabled --tracing-endpoint <collector> and verify traces in Jaeger
  • Verify gRPC and HTTP spans are created
  • Verify CT log outbound calls are traced
  • Verify no impact when tracing is disabled (default)

Add distributed tracing using OpenTelemetry with OTLP gRPC exporter.
Instruments HTTP handlers (otelhttp), gRPC servers (otelgrpc), and
outbound CT log HTTP client. Tracing is controlled via CLI flags.

Uses the shared tracing library from sigstore/model-validation-operator.

Signed-off-by: Nina Bongartz <nolear@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant