Skip to content

[eno] Adding more Eno metrics#607

Draft
ruinan-liu wants to merge 2 commits into
mainfrom
users/ruinanliu/eno-controller-reconciler-metrics
Draft

[eno] Adding more Eno metrics#607
ruinan-liu wants to merge 2 commits into
mainfrom
users/ruinanliu/eno-controller-reconciler-metrics

Conversation

@ruinan-liu
Copy link
Copy Markdown
Collaborator

@ruinan-liu ruinan-liu commented May 22, 2026

Add observability metrics for Eno synthesis and reconciliation

Implements the gaps documented in docs/observability-gaps.md.

New metrics:

  • eno-controller:
    • eno_synthesis_result_total{synthesizer,result}
    • eno_synthesis_duration_seconds{synthesizer,result}
    • eno_composition_synthesis_wait_seconds
  • eno-reconciler:
    • eno_reconciliation_workqueue_depth
    • eno_write_buffer_depth
    • eno_write_buffer_status_update_errors_total{op}

Bug fix:

  • eno_reconciliation_duration_seconds was observing milliseconds into
    second-named buckets, sending 100% of samples to +Inf. Fixed in place
    since existing data was already unusable.

Implementation notes:

  • The two new depth gauges use prometheus.NewGaugeFunc backed by an
    atomic.Pointer[func() int] mailbox so they can be registered at init()
    time before their queue exists.
  • Reconciler depth: installed via controller-runtime's NewQueue hook
    on the Controller's TypedOptions; intercepts the same typed queue
    controller-runtime would have constructed by default.
  • WriteBuffer depth: installed when the buffer constructs its own
    workqueue in NewResourceSliceWriteBuffer.
  • The flowcontrol write buffer's queue was switched from the deprecated
    workqueue.RateLimitingInterface to the typed
    workqueue.TypedRateLimitingInterface[types.NamespacedName], dropping
    the interface{} cast in processQueueItem.

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.

2 participants