app_debugger_analytics Pro
Analytics event inspector sub-brick for
app_debugger. Adds an Analytics tab to the debugger panel that captures allAnalyticInterceptorevents in a ring buffer (default: 1000 entries). Automatically swapped to a no-op stub in release builds.
Version: 1.0.0
Variables
This brick has no generation-time variables.
Prerequisites
app_debuggerbrick must be installed first (providesarchipelago:debug_panel_pagessentinel).analytics_implmust be a dependency oftemplate_app(providesAnalyticsInitializer).
Usage
Interactive
archipelago generate app_debugger_analyticsNon-interactive (CI)
archipelago generate app_debugger_analytics --config my_config.jsonGenerated Structure
features/
└── app_debugger_analytics/
├── app_debugger_analytics_api/
│ └── lib/src/
│ └── models/
├── app_debugger_analytics/
│ └── lib/src/
│ └── di/
└── app_debugger_analytics_noop/
└── lib/src/
└── di/Wiring (Auto-Patched by post_gen.dart)
bootstrap.dart — eager resolution
// archipelago:debug_panel_pages:start
GetIt.I<AnalyticsInspectorSDK>();
// archipelago:debug_panel_pages:endbootstrap.dart — interceptor registration
// archipelago:analytics_inspector_interceptor:start
final analyticsInterceptor = GetIt.I<AnalyticsInspectorSDK>().interceptor;
if (analyticsInterceptor != null) {
AnalyticsInitializer.registerInterceptor(analyticsInterceptor);
}
// archipelago:analytics_inspector_interceptor:endIf the post-gen hook could not locate the sentinel (e.g. app_debugger was not installed), add this wiring manually to apps/template_app/lib/bootstrap.dart.
Interceptor Chain Semantics
The AnalyticsDebuggerInterceptor is purely observational — it never drops events. intercept() always calls chain.proceed(data) and returns the result. Adding this interceptor has no side-effects on your analytics pipeline.
The onSetUserId and onReset hooks track the current user ID so captured entries carry the user context at the time of the event.
build_prepare Swap
- debug: app_debugger_analytics
release: app_debugger_analytics_noop