View Source Beeline.Appsignal (BeelineAppsignal v1.0.1)

an Appsignal exporter for Beeline telemetry

This exporter works by attaching a telemetry handler. This means that the code to set the gauge runs in the process of the HealthChecker.

Attach this exporter by adding this task to a supervision tree, for example the application supervision tree defined in the lib/my_app/application.ex file:

def start(_type, _args) do
  children = [
    {Beeline.Appsignal, []},
    MyApp.MyBeelineTopology
  ]
  opts = [strategy: :one_for_one, name: MyApp.Supervisor]
  Supervisor.start_link(children, opts)
end

This exporter sets an Appsignal gauge measuring the difference between the latest available event number and the current position given by the Beeline's :get_stream_position function option. This gauge is tagged with the name of the producer under the key :module and the hostname on which the producer is running under the key :hostname.

options

Options

The start_link/1 function takes a keyword list of options. These can also be specified by passing the keyword as the second element of a tuple given to a Supervisor.start_link/2 list of children.

  • :gauge_name (string, default: "event_listener_lag") - the gauge name to which the delta should be published

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Link to this section Functions

Returns a specification to start this module under a supervisor.

arg is passed as the argument to Task.start_link/1 in the :start field of the spec.

For more information, see the Supervisor module, the Supervisor.child_spec/2 function and the Supervisor.child_spec/0 type.