Timeless

LiveDashboard Plugin for Timeless Logs

Hex.pmDocsLicense


"I found it ironic that the first thing you do to time series data is squash the timestamp. That's how the name Timeless was born." --Mark Cotner

Phoenix LiveDashboard page for browsing TimelessLogs logs.

Provides three tabs:

Installation

Quick Start (Igniter)

mix igniter.install timeless_logs_dashboard

This automatically:

  1. Adds config :timeless_logs, data_dir: "priv/timeless_logs" to your config
  2. Adds import TimelessLogsDashboard.Router to your router
  3. Adds timeless_logs_dashboard "/dashboard" to your browser scope
  4. Updates your .formatter.exs

For in-memory storage (logs lost on restart):

mix igniter.install timeless_logs_dashboard --storage memory

Manual Setup

Add timeless_logs_dashboard to your dependencies:

def deps do
[
{:timeless_logs_dashboard, "~> 0.7"}
]
end

Configure TimelessLogs in config/config.exs:

config :timeless_logs, data_dir: "priv/timeless_logs"

Add the router macro:

# lib/my_app_web/router.ex
import TimelessLogsDashboard.Router
scope "/" do
pipe_through :browser
timeless_logs_dashboard "/dashboard"
end

Or add the page directly to an existing LiveDashboard:

live_dashboard "/dashboard",
additional_pages: [
logs: TimelessLogsDashboard.Page
]

Navigate to /dashboard/logs in your browser.

Reading from the Rust data plane

By default the dashboard reads the embedded TimelessLogs store. It can instead delegate reads to a Rust logs data plane through a configured HTTP client (such as the release Stack adapter):

config :timeless_logs_dashboard,
historical_source:
{TimelessLogsDashboard.HistoricalSource.DataPlane, client: MyStack.LogsClient}

The client must implement query/1 and stats/0. Live tail also works over the data plane when the client additionally exports tail/3 (streaming /select/logsql/tail); with a tail-less client, the Live Tail tab fails explicitly instead of silently consulting the embedded store.

Requirements

License

MIT