Alchemetrics v0.2.2 Alchemetrics.CustomReporter behaviour View Source
Link to this section Summary
Callbacks
This is called when the reporter is started. You can put some initialization code here, like connection stuff
This is called every time a metric datapoint is reported
Link to this section Types
Link to this section Callbacks
This is called when the reporter is started. You can put some initialization code here, like connection stuff.
The opts
argument stores reporter specific configuration. You can set this parameter with opts
option on reporter_list
config.
# The value of `opts` key is the argument of the init/1 function!
config :alchemetrics, reporter_list: [
[module: MyApp.DummyReporter, opts: [some_data: "hello!"]]
]
This is called every time a metric datapoint is reported.
For a metric which is reported every 10 seconds, this function will be called every 10 seconds for each one of its datapoints.