Follow the Journey
3 min read

Flux is Live

Custom metrics that actually matter

Pulse tracks requests. Reflex tracks errors. Recall tracks logs.

But what about the metrics that are yours?

Signups per hour. Revenue per day. Cart abandonment rate. Feature adoption. The numbers that actually tell you if your business is working.

That's Flux.

The problem with custom metrics

Every monitoring tool has "custom metrics." They all make it painful.

Complex SDKs. Rigid schemas. Expensive pricing per metric. Dashboards that take an hour to configure.

So you end up tracking custom metrics in spreadsheets. Or not at all.

Flux makes it simple

# Track an event
BrainzLab.track("user_signed_up", user_id: user.id, plan: "pro")

# Track a metric
BrainzLab.gauge("active_users", User.active.count)
BrainzLab.counter("api_calls", tags: { endpoint: "/users" })

That's it. Two lines to track anything.

Events and metrics flow to Flux. Dashboards update in real-time. No complex setup.

Events vs metrics

Events are discrete occurrences. A user signed up. An order was placed. A feature was used.

Events have properties. Who did it. When. What context.

Metrics are measurements. Current active users. Revenue this month. Error rate right now.

Metrics have types:
- Gauge — Current value. Active connections. Queue depth.
- Counter — Cumulative total. Requests served. Bytes transferred.
- Distribution — Statistical spread. Response time percentiles.
- Set — Unique values. Distinct users. Unique sessions.

Flux handles both.

Real-time dashboards

Build dashboards in minutes:

  • Number widgets — Current value with trend.
  • Graph widgets — Time series with multiple metrics.
  • Bar charts — Comparisons across dimensions.
  • Pie charts — Distribution breakdowns.
  • Tables — Ranked lists and leaderboards.
  • Heatmaps — Patterns over time.

Drag, drop, configure. Real-time updates via ActionCable.

No dashboard builder has ever been this fast.

Anomaly detection

Flux doesn't just display metrics. It watches them.

Spike in signups? Flux notices.

Drop in conversion? Flux alerts.

Unusual pattern in API calls? Flux flags it.

AI-powered anomaly detection. No manual threshold configuration.

TimescaleDB under the hood

Custom metrics can get big. Millions of data points per day.

Flux uses TimescaleDB—PostgreSQL optimized for time-series data.

Hypertables automatically partition by time. Queries stay fast even with billions of rows.

Continuous aggregates pre-compute rollups. Hourly, daily, weekly summaries ready instantly.

Compression shrinks old data 10x. Keep years of history without breaking the bank.

The integration

# config/initializers/brainzlab.rb
BrainzLab.configure do |config|
  config.flux_url = "http://flux.localhost"
end

# Anywhere in your app
BrainzLab.track("purchase_completed",
  user_id: user.id,
  amount: order.total,
  items: order.items.count,
  payment_method: order.payment_method
)

Events are batched automatically. No performance impact on your app.

Ask Claude about your metrics

"How are signups trending this week compared to last?"

Claude queries Flux. Compares the data. Tells you:

"Signups are up 23% week-over-week. The spike started Tuesday after your Product Hunt launch. Conversion to paid is holding steady at 4.2%."

Your custom metrics, accessible via natural language.

Try it

docker-compose up -d flux

# Open http://flux.localhost

Track your first event. Build your first dashboard.

Finally, the metrics that matter.

— Andres

Want to follow the journey?

Get Updates