Skip to content

Commit

Permalink
[frontend] Send all the metrics to the same channel
Browse files Browse the repository at this point in the history
Instead of having one routing key / channel for each metric we are now
sending all to "opensuse.obs.metrics"

Co-authored-by: Ana María Martínez Gómez <ammartinez@suse.de>
Co-authored-by: David Kang <dkang@suse.com>
  • Loading branch information
3 people committed Apr 24, 2018
1 parent 8e1ad45 commit 13299d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contrib/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
## AMQP queue name
queue = ""
## Binding Key
binding_key = "#"
binding_key = "opensuse.obs.metrics"

## Maximum number of messages server should give to the worker.
prefetch_count = 50
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/models/event/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def _roles(role, project, package = nil)

def send_to_bus
RabbitmqBus.send_to_bus(self.class.message_bus_routing_key, self[:payload])
RabbitmqBus.send_to_bus("metrics.#{self.class.message_bus_routing_key}", to_metric) if metric_fields.present?
RabbitmqBus.send_to_bus('metrics', to_metric) if metric_fields.present?
end

private
Expand Down

0 comments on commit 13299d3

Please sign in to comment.