LogflareEx.TelemetryReporter (logflare_ex v0.2.0-dev.980340db)

A TelemetryReporter for attaching to metrics created from :telemetry_metrics. Telemetry events are sent to the Logflare API as is.

Add the following to your mix.exs

def deps do
  [
      {:telemetry, "~> 1.0"},
      {:telemetry_metrics, "~> 0.6.1"},
  ]
end

Thereafter, add the LogflareEx.TelemetryReporter to your supervision tree:

  # application.ex
  children = [
    {LogflareEx.TelemetryReporter, metrics: [
      last_value("some.event.stop.duration")
    ]}
  ]
  ...

The LogflareEx.TelemetryReporter will attach to all provided metrics.

Summary

Functions

Returns a specification to start this module under a supervisor.

:telemetry.attach/4 callback for allowing attaching to telemetry events. Telemetry events attached this way are batched to Logflare.

Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

handle_attach(event, measurements, metadata, config)

@spec handle_attach(list(), map(), map(), nil | list()) :: :ok

:telemetry.attach/4 callback for allowing attaching to telemetry events. Telemetry events attached this way are batched to Logflare.

Link to this function

start_link(opts)