Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Add a queue utilization metric to report how full the queue is as a percentage #265

Open
Tracked by #16
cmacknz opened this issue Feb 28, 2023 · 0 comments
Open
Tracked by #16
Labels
Team:Elastic-Agent Label for the Agent team

Comments

@cmacknz
Copy link
Member

cmacknz commented Feb 28, 2023

Add a new queue utilization metric to report how full the queue is as a percentage. The queue utilization should be calculated as (CurrentLevel / MaximumLevel) * 100 where the level variables are defined by:

// CurrentLevel reports the current fill state of the queue, in the native user-configured limits of the queue
CurrentLevel opt.Uint `struct:"current_level,omitempty" json:"current_level"`
//MaxLevel reports the user-configured max level of the queue, in the native user-configured limiits
MaxLevel opt.Uint `struct:"max_level,omitempty" json:"max_level"`

Acceptance Criteria:

  • A queue utilization metric is available on the shipper's metrics HTTP interface under the /debug/vars path.
  • A test exists proving that the queue utilization changes as expected as the queue fills up. An empty queue reports 0, a half-full queue reports 50, and a full queue reports 100.
@cmacknz cmacknz added the Team:Elastic-Agent Label for the Agent team label Feb 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

No branches or pull requests

1 participant