fix(rule_engine_metrics): fix RuleID reference
This commit is contained in:
parent
c214af2ac0
commit
2608798826
|
@ -55,23 +55,23 @@ apply_rules([Rule = #rule{id = RuleID}|More], Input) ->
|
||||||
catch
|
catch
|
||||||
%% ignore the errors if select or match failed
|
%% ignore the errors if select or match failed
|
||||||
_:{select_and_transform_error, Error} ->
|
_:{select_and_transform_error, Error} ->
|
||||||
emqx_rule_metrics:inc_rules_exception(RuleId),
|
emqx_rule_metrics:inc_rules_exception(RuleID),
|
||||||
?LOG(warning, "SELECT clause exception for ~s failed: ~p",
|
?LOG(warning, "SELECT clause exception for ~s failed: ~p",
|
||||||
[RuleID, Error]);
|
[RuleID, Error]);
|
||||||
_:{match_conditions_error, Error} ->
|
_:{match_conditions_error, Error} ->
|
||||||
emqx_rule_metrics:inc_rules_exception(RuleId),
|
emqx_rule_metrics:inc_rules_exception(RuleID),
|
||||||
?LOG(warning, "WHERE clause exception for ~s failed: ~p",
|
?LOG(warning, "WHERE clause exception for ~s failed: ~p",
|
||||||
[RuleID, Error]);
|
[RuleID, Error]);
|
||||||
_:{select_and_collect_error, Error} ->
|
_:{select_and_collect_error, Error} ->
|
||||||
emqx_rule_metrics:inc_rules_exception(RuleId),
|
emqx_rule_metrics:inc_rules_exception(RuleID),
|
||||||
?LOG(warning, "FOREACH clause exception for ~s failed: ~p",
|
?LOG(warning, "FOREACH clause exception for ~s failed: ~p",
|
||||||
[RuleID, Error]);
|
[RuleID, Error]);
|
||||||
_:{match_incase_error, Error} ->
|
_:{match_incase_error, Error} ->
|
||||||
emqx_rule_metrics:inc_rules_exception(RuleId),
|
emqx_rule_metrics:inc_rules_exception(RuleID),
|
||||||
?LOG(warning, "INCASE clause exception for ~s failed: ~p",
|
?LOG(warning, "INCASE clause exception for ~s failed: ~p",
|
||||||
[RuleID, Error]);
|
[RuleID, Error]);
|
||||||
_:Error:StkTrace ->
|
_:Error:StkTrace ->
|
||||||
emqx_rule_metrics:inc_rules_exception(RuleId),
|
emqx_rule_metrics:inc_rules_exception(RuleID),
|
||||||
?LOG(error, "Apply rule ~s failed: ~p. Stacktrace:~n~p",
|
?LOG(error, "Apply rule ~s failed: ~p. Stacktrace:~n~p",
|
||||||
[RuleID, Error, StkTrace])
|
[RuleID, Error, StkTrace])
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue