Emit a trace of the autoscaler decision
When Taskscaler recommends a scale change, it's good to know why. In addition to knowing the inputs and outputs, there some intermediate variables that are important for tracing the decision logic. This would be very useful for finding bugs like Do not scale above max instances (!35 - merged) • Joe Burnett.
As simple structure returned from RequiredInstances
in addition to the scale change would suffice. We can JSON serialize it and emit it to the logs when the scale changes (return is non-zero).