Skip to content

[Observability 10/10] Add OTEL metrics to controller reconcilers #317

Description

@concaf

Context

Extend OTEL metrics instrumentation to the 7 controller reconcilers. The controller already has built-in controller-runtime metrics (workqueue depth, reconcile duration) but no custom application-level metrics.

Scope (to be detailed)

  • Add custom metrics to controller reconcilers:
    • Reconcile error counter by CR name and controller
    • CR state duration (time spent in non-ready state)
    • Stage processing metrics
  • Wire telemetry init into cmd/main.go (controller entry point)
  • Leverage existing controller-runtime metrics registry where possible

Controllers to instrument (7 total)

  • ControllerConfigReconciler
  • UnstructuredDataPipelineReconciler
  • DocumentProcessorReconciler
  • ChunksGeneratorReconciler
  • VectorEmbeddingsGeneratorReconciler
  • SourceCrawlerReconciler
  • DestinationSyncerReconciler

Use cases enabled

B6 (repeated reconcile errors), B7 (CR stuck non-ready), C6 (reconcile duration)

Depends on

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgoPull requests that update go codeobservabilityMetrics, tracing, alerting, and monitoring

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions