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

Add queue size prometheus metric #49

Merged
merged 2 commits into from
Apr 23, 2018
Merged

Add queue size prometheus metric #49

merged 2 commits into from
Apr 23, 2018

Conversation

stevesloka
Copy link
Member

@stevesloka stevesloka commented Apr 20, 2018

This adds the queue size metric. Fixes #48

Signed-off-by: Steve Sloka steves@heptio.com

Signed-off-by: Steve Sloka <steves@heptio.com>
@@ -45,6 +45,8 @@ var (
discovererMetrics localmetrics.DiscovererMetrics
)

const clusterType = "kubernetes"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this could live inside k8s.NewController? Similar with the openstack one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup it could, for openstack you would put into the Reconciler? I was trying to be explicit since the cmd was the entry point.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, yeah

@@ -52,17 +54,20 @@ func NewQueue(logger *logrus.Logger, clusterName string, kubeClient kubernetes.I
Threadiness: threadiness,
Metrics: metrics,
ClusterName: clusterName,
ClusterType: clusterType,
}
}

// Action that is added to the queue for processing
type Action interface {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if this should be called "Resource" or something... Not this PRs concern though

Signed-off-by: Steve Sloka <steves@heptio.com>
@stevesloka stevesloka self-assigned this Apr 23, 2018
Copy link
Contributor

@alexbrand alexbrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alexbrand alexbrand merged commit e73785b into master Apr 23, 2018
@alexbrand alexbrand deleted the metricQueueSize branch April 23, 2018 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants