Reports/integrations

Reports & Observability Integrations

Connect Firebase Crashlytics dual-reporting or Measure SDK to stream live crashes and app telemetry directly into your workspace console.

Dual-Reporting Wrapper InstructionsAES-256 Encrypted

Keep your existing Firebase Crashlytics SDK working 100% while mirroring crash reports to Magiquip Console.

1
Add HTTP & Firebase Crashlytics Dependencies
Step 1 • CLI

Run this command in your project root or add the library to your build configuration:

flutter pub add http firebase_core firebase_crashlytics
2
Authenticate Ingestion with Your Workspace API Key
Step 2 • Isolated

Every request requires an active Magiquip API key in the x-api-key header to stream telemetry into your workspace.

x-api-key:mq_crash_live_YOUR_API_KEY
3
Add Dual-Reporting Wrapper to Application Main
lib/main.dart

Paste this wrapper into your entry point. Crashes are recorded to Firebase Crashlytics as normal and mirrored into your Magiquip console simultaneously.

lib/main.dart
// 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());
}
4
Verify Pipeline & Live Connection
Listening for events

Run your app to trigger an event. Once your mobile app initializes with the API key, events will automatically stream into your reports dashboard.

Pipeline active: Incoming crashes and session telemetry will appear in real time

Configured Ingestion API Keys

These keys authenticate crash reports and performance metrics sent from your apps into Magiquip.

Loading API keys...