Skip to content
This repository was archived by the owner on Sep 21, 2023. It is now read-only.
This repository was 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

@cmacknz

Description

@cmacknz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions