Reports & Observability Integrations
Connect Firebase Crashlytics dual-reporting or Measure SDK to stream live crashes and app telemetry directly into your workspace console.
Keep your existing Firebase Crashlytics SDK working 100% while mirroring crash reports to Magiquip Console.
Run this command in your project root or add the library to your build configuration:
Every request requires an active Magiquip API key in the x-api-key header to stream telemetry into your workspace.
Paste this wrapper into your entry point. Crashes are recorded to Firebase Crashlytics as normal and mirrored into your Magiquip console simultaneously.
// main.dart - Magiquip Dual-Reporting Firebase Crashlytics Setup
import 'package:flutter/material.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'dart:convert';
import 'package:http/http.dart' as http;
Future<void> sendToMagiquip({
required dynamic exception,
StackTrace? stack,
bool fatal = true,
}) async {
try {
await http.post(
Uri.parse('https://api.magiquip.com/crashlytics/events'),
headers: {
'Content-Type': 'application/json',
'x-api-key': 'mq_crash_live_YOUR_API_KEY',
},
body: jsonEncode({
'events': [
{
'type': fatal ? 'exception' : 'handled_exception',
'data': {
'type': exception.runtimeType.toString(),
'message': exception.toString(),
'stacktrace': stack?.toString() ?? '',
'handled': !fatal,
},
'attributes': {
'platform': 'flutter',
'framework': 'flutter',
'app_version': '1.0.0',
},
}
],
}),
);
} catch (_) {}
}
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
// 1. Capture Flutter Framework UI Errors
FlutterError.onError = (FlutterErrorDetails details) {
// Report to Firebase Crashlytics as normal
FirebaseCrashlytics.instance.recordFlutterFatalError(details);
// Mirror directly into Magiquip Console
sendToMagiquip(exception: details.exception, stack: details.stack, fatal: true);
};
// 2. Capture Async Unhandled Dart Errors
PlatformDispatcher.instance.onError = (error, stack) {
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
sendToMagiquip(exception: error, stack: stack, fatal: true);
return true;
};
runApp(const MyApp());
}Run your app to trigger an event. Once your mobile app initializes with the API key, events will automatically stream into your reports dashboard.
Configured Ingestion API Keys
These keys authenticate crash reports and performance metrics sent from your apps into Magiquip.