Skip to content

Commit 9a5c6a2

Browse files
TonsOfFunclaude
andauthored
feat: add telemetry engine for distributed tracing (#326)
* feat: add telemetry engine for distributed tracing Adds a comprehensive telemetry system for collecting and reporting agent traces to hosted or self-hosted observability endpoints. Features: - Trace collection with spans for generation lifecycle - Token usage tracking (input, output, thinking) - Tool call tracing with timing - Error recording with backtraces - Async HTTP reporting with batching - Configurable sampling rate - Auto-instrumentation via railtie Configuration via YAML: telemetry: enabled: true endpoint: https://api.activeagents.ai/v1/traces api_key: your-api-key sample_rate: 1.0 Or programmatically: ActiveAgent::Telemetry.configure do |config| config.enabled = true config.endpoint = "https://..." config.api_key = "..." end 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: add dashboard engine for telemetry visualization This adds a Rails Engine to the ActiveAgent gem that provides: - TelemetryTrace model for storing traces - TracesController for viewing traces in a dashboard - API::TracesController for ingesting traces - ProcessTelemetryTracesJob for async trace processing - ERB views with Tailwind CSS for the dashboard UI - Install generator for migrations and configuration The dashboard supports two modes: - Local mode: Single-tenant, no auth, synchronous processing - Multi-tenant mode: Account association, API key auth, async processing Configuration options: - multi_tenant: Enable multi-tenant mode - account_class: Class name for Account model - current_account_method: Controller method to get current account - trace_model_class: Custom trace model class - use_inertia: Enable React/Inertia frontend - authentication_method: Custom auth callback 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: rename create_migration to avoid Rails conflict The method name 'create_migration' conflicts with ActiveRecord::Generators::Migration module internals. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat(dashboard): Add engine models, jobs, and install generator - Add Agent, AgentRun, AgentVersion, AgentTemplate models - Add SandboxSession, SandboxRun models - Add SessionRecording, RecordingAction, RecordingSnapshot models - Add AgentExecutionJob, SandboxProvisionJob, SandboxCleanupJob - Add install generator with migrations - Add DashboardController for root view - Fix RuboCop: exclude generator templates from linting - Fix style issues (array bracket spacing) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 209e23e commit 9a5c6a2

57 files changed

Lines changed: 6868 additions & 1050 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ AllCops:
1515
- "test/dummy/tmp/**/*"
1616
- "node_modules/**/*"
1717
- "vendor/**/*"
18+
- "lib/generators/**/templates/**/*"
1819

1920
Style/StringLiterals:
2021
EnforcedStyle: double_quotes

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
nodejs 24.7.0
2+
ruby 3.4.8

docs/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export default defineConfig({
9999
{ text: 'Providers', link: '/providers' },
100100
{ text: 'Configuration', link: '/framework/configuration' },
101101
{ text: 'Instrumentation', link: '/framework/instrumentation' },
102+
{ text: 'Telemetry', link: '/framework/telemetry' },
102103
{ text: 'Retries', link: '/framework/retries' },
103104
{ text: 'Rails Integration', link: '/framework/rails' },
104105
{ text: 'Testing', link: '/framework/testing' },

docs/.vitepress/theme/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
rgb(255, 100, 100) 20%,
103103
rgb(250, 52, 59) 40%,
104104
rgb(255, 100, 100) 60%,
105-
rgb(250, 52, 59) 100%
105+
rgb(250, 52, 59) 80%
106106
);
107107

108108
--vp-home-hero-image-background-image: radial-gradient(

0 commit comments

Comments
 (0)