@@ -65,6 +65,7 @@ public void eventReceived(Action action, Pod resource) {
6565 // If we're not watching all namespaces or the event is from a namespace we're not watching, do nothing
6666 return ;
6767 }
68+ LOG .info ("WATCHING NAMESPACE" );
6869
6970 if (resource .getMetadata ().getLabels ().containsKey (config .pod ().identifier ())) {
7071 // Get/Create metric
@@ -74,6 +75,7 @@ public void eventReceived(Action action, Pod resource) {
7475 switch (action ) {
7576 case ADDED :
7677 if (includePod (config , resource .getMetadata ().getLabels (), spec )) {
78+ LOG .info ("CREATING METRIC, POD INCLUDED" );
7779 if (podGroup == null ) {
7880 podGroup = new PodGroup ();
7981 podGroup .addPod (resource .getMetadata ().getName (), resource .getMetadata ().getNamespace ());
@@ -91,6 +93,7 @@ public void eventReceived(Action action, Pod resource) {
9193 break ;
9294 case DELETED :
9395 if (podGroup != null ) {
96+ LOG .info ("POD DELETE EVENT. REMOVING" );
9497 podGroup .removePod (resource .getMetadata ().getName ());
9598
9699 if (podGroup .list ().size () == 0 ) {
@@ -252,6 +255,7 @@ public double applyAsDouble(PodGroup value) {
252255 }
253256 } catch (KubernetesClientException kce ) {
254257 // Ignore, as it likely means a pod is "ready", but no metrics available yet
258+ LOG .info ("EXCEPTION RETRIEVING METRICS" , kce );
255259 }
256260 } else {
257261 // Ignore, as the pod is not "ready"
0 commit comments