lib/alephant/broker/component_factory.rb in alephant-broker-3.0.1 vs lib/alephant/broker/component_factory.rb in alephant-broker-3.1.0
- old
+ new
@@ -18,12 +18,14 @@
component_meta,
@load_strategy.load(component_meta)
)
rescue Alephant::Broker::Errors::ContentNotFound => e
logger.warn 'Broker.ComponentFactory.create: Exception raised (ContentNotFound)'
+ logger.metric(:name => "BrokerComponentFactoryContentNotFound", :unit => "Count", :value => 1)
ErrorComponent.new(component_meta, 404, e)
rescue => e
logger.warn("Broker.ComponentFactory.create: Exception raised (#{e.message}, #{e.backtrace.join('\n')})")
+ logger.metric(:name => "BrokerComponentFactoryExceptionRaised", :unit => "Count", :value => 1)
ErrorComponent.new(component_meta, 500, e)
end
end
end
end