Skip to content

Generalize SimpleSubscriber #60

Closed
Closed
@dmke

Description

@dmke

From @ChrisBr:

I would also like to refactor the SimpleSubscriber to be useful out of the box and users can just subscribe to any ActiveSupport hook like this:

series_name = 'series_name'
tags = [:foo, :bar]
normalizer = Proc.new { }
subscriber = InfluxDB::Rails::Subscriber.new('series_name'
ActiveSupport::Notifications.subscribe('the_notification', tags, normalizer)

The tags would be an array of the tags which should be extracted from the notification data. The normalizer is a proc which gets called with the data and optinally transforms it.

Not sure yet how the data will be structured in the influxdb though. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions