In Threshd, added some debug statements + slight code refactoring

Description

I'm trying to debug an issue with threshold filters with mfurhman and find it very difficult to understand what's going with actual DEBUG logging.

I'll send you a PR to add some debug statements in this part of the code.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Cyrille Bollu January 30, 2017 at 5:35 AM

Here's the list of change I made in the code (not mentioning the added debug statements):

1- I merged 2 if then else tests together using else if in file CollectionResourceWrapper.java, function getFieldValue: This should be trivial for you to review. The function's behavior shouldn't have changed;
2- I rewrote the passedThresholdFilters function In file ThresholdingSet.java to make it easier to add debug statements, essentialy moving 2 return statements out of the for loop and make use of break statements instead : This change might be a little bit harder to review, but the end result should be easier to read and the function's behavior shouldn't have changed

Cyrille Bollu January 26, 2017 at 10:04 AM

Details

Assignee

Reporter

Components

Affects versions

Priority

PagerDuty

Created January 26, 2017 at 9:57 AM
Updated September 21, 2021 at 9:15 PM