Skip to content

Simplify dashboard install and make engine mount path configurable - #351

Draft
TonsOfFun wants to merge 3 commits into
mainfrom
claude/agent-card-logo-metrics-r2p8bg
Draft

Simplify dashboard install and make engine mount path configurable#351
TonsOfFun wants to merge 3 commits into
mainfrom
claude/agent-card-logo-metrics-r2p8bg

Conversation

@TonsOfFun

Copy link
Copy Markdown
Contributor

Summary

This PR refactors the dashboard installation and configuration to support self-hosted observability deployments. It removes the bloated install generator that created eight unused migrations, consolidates to a single focused generator, and makes the engine's ingest endpoint automatically derive from its actual mount path.

Key Changes

  • Removed duplicate install generator: Deleted the active_agent:dashboard:install variant that copied migrations for agents, sandboxes, recordings, and templates—tables with no shipped controllers or routes. The surviving generator now installs only the telemetry traces table.

  • Canonical mount path changed to /activeagents: Updated all references in generator templates, dummy app, documentation, and tests. This is now the default path for self-hosted deployments.

  • Dynamic ingest endpoint resolution: The telemetry client now derives its local ingest path from wherever the engine is actually mounted via dashboard_mount_path. Any mount path works—/activeagents, /observability, or / on a dedicated subdomain. Falls back to LOCAL_ENDPOINT_PATH when the engine isn't mounted.

  • Ingest API authentication: Added ingest_api_key configuration option. Single-tenant mode accepts unauthenticated posts by default (fine for same-app storage) but requires the key when the mount is network-reachable. Multi-tenant mode continues to use per-account Bearer tokens.

  • Simplified initializer template: Removed sandbox, multi-tenant, and storage configuration from the default template. The new template focuses on authentication and ingest options with clear comments about when each is needed.

  • Generator options: Added --skip_migrations and --skip_routes flags for apps that manage these separately.

  • Dashboard controller scoping: TracesController now honors trace_model_class override and multi-tenant scoping across all queries (index, metrics, time-series), not just the show action.

  • Comprehensive documentation: Added docs/framework/self-hosted-observability.md covering deployment, authentication, multi-tenant setup, RubyLLM integration, and operations guidance.

Implementation Details

  • The local_endpoint_path method in Telemetry::Configuration inspects the Rails router to find the dashboard engine's mount point and constructs the ingest URL dynamically.
  • Ingest API authentication is enforced via authenticate_ingest_key! before action, checking the Authorization: Bearer header against the configured key.
  • Multi-tenant mode's async processing via ActiveAgent::ProcessTelemetryTracesJob is preserved and documented.
  • All tests updated to use the new /activeagents path and verify the dynamic endpoint resolution.

https://claude.ai/code/session_01CR1TdyJmDqq5dTqypCwYkw

claude added 3 commits August 10, 2026 21:29
…agents, scoped queries, ingest auth

- Remove the duplicate active_agent:dashboard:install generator (nondeterministic
  namespace collision; installed migrations for orphaned models). The surviving
  telemetry-only generator gains --skip_migrations/--skip_routes and a fuller
  initializer template (auth, ingest_api_key, multi-tenant).
- Canonical mount path /activeagents; local telemetry ingest endpoint now derives
  from the engine's actual mount (any path or a subdomain root works), with
  LOCAL_ENDPOINT_PATH kept as the unmounted fallback.
- TracesController: index/metrics/time-series honor Dashboard.trace_model and
  for_account scoping (previously only show did; multi-tenant leaked across
  accounts and trace_model_class was half-honored).
- New config.ingest_api_key: single-tenant ingest requires a Bearer token when
  set — reporter and ruby_llm_telemetry already send one.
- Fix metrics page 500 with data (grouped-row alias shadowed by model method).
- Drop never-consumed base_controller_class config attr.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CR1TdyJmDqq5dTqypCwYkw
…sole refresh

New docs/framework/self-hosted-observability.md: mounting the engine in an
existing Rails app (path or dedicated subdomain, e.g.
activeagents.combinaut.com), production auth, ingest_api_key, fleet ingest,
ruby_llm_telemetry for RubyLLM apps, solid_agent correlation, operations
(retention, DB portability, CDN/CSP caveat), and the cloud-mode relationship.
Every step verified against a fresh Rails app and the support_inbox example.

dashboard.md: correct the generator description (telemetry-only), move to
the /activeagents mount path, note ingest auth; telemetry.md: point
self-hosting at the engine's ready-made endpoint; sidebar now lists both
observability pages (dashboard.md was previously unlisted).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CR1TdyJmDqq5dTqypCwYkw
activeagents-telemetry 0.1.0 and activeagents-telemetry-ruby_llm 0.1.0
are published; drop the GitHub source lines from every gemfile and update
the self-hosted guide's install and RubyLLM sections to the published
gems (adapter namespace is ActiveAgents::Telemetry::RubyLLM).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CR1TdyJmDqq5dTqypCwYkw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants