Simplify dashboard install and make engine mount path configurable - #351
Draft
TonsOfFun wants to merge 3 commits into
Draft
Simplify dashboard install and make engine mount path configurable#351TonsOfFun wants to merge 3 commits into
TonsOfFun wants to merge 3 commits into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:installvariant 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 toLOCAL_ENDPOINT_PATHwhen the engine isn't mounted.Ingest API authentication: Added
ingest_api_keyconfiguration 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_migrationsand--skip_routesflags for apps that manage these separately.Dashboard controller scoping:
TracesControllernow honorstrace_model_classoverride and multi-tenant scoping across all queries (index, metrics, time-series), not just the show action.Comprehensive documentation: Added
docs/framework/self-hosted-observability.mdcovering deployment, authentication, multi-tenant setup, RubyLLM integration, and operations guidance.Implementation Details
local_endpoint_pathmethod inTelemetry::Configurationinspects the Rails router to find the dashboard engine's mount point and constructs the ingest URL dynamically.authenticate_ingest_key!before action, checking theAuthorization: Bearerheader against the configured key.ActiveAgent::ProcessTelemetryTracesJobis preserved and documented./activeagentspath and verify the dynamic endpoint resolution.https://claude.ai/code/session_01CR1TdyJmDqq5dTqypCwYkw