Store processing metric on per trigger ref and not trigger instance id
basis.
Doing is on per trigger instance id basis is an anti-pattern because
id is a primary key which means it could result in a lot of metrics
which most metrics systems couldn't handle efficently.
@@ -87,7 +87,7 @@ class TriggerInstanceDispatcher(consumers.StagedMessageHandler):
trigger_instance, trigger_constants.TRIGGER_INSTANCE_PROCESSING)
with CounterWithTimer(key='rule.processed'):
- with Timer(key='triggerinstance.%s.processed' % (trigger_instance.id)):
+ with Timer(key='trigger.%s.processed' % (trigger_instance.trigger)):
self.rules_engine.handle_trigger_instance(trigger_instance)
container_utils.update_trigger_instance_status(
