main function
void
main()
Implementation
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// Initialize your clean telemetry package
await EdgeTelemetry.initialize(
endpoint: 'http://localhost:3000/telemetry', // JSON endpoint (not OpenTelemetry)
serviceName: 'edge-telemetry-demo',
debugMode: true,
useJsonFormat: true, // Explicitly enable JSON format
);
// Set user context (optional)
EdgeTelemetry.instance.setUserProfile(
email: 'demo@example.com',
name: 'Demo User',
);
runApp(MyApp());
}