edge_telemetry_flutter 1.3.10
edge_telemetry_flutter: ^1.3.10 copied to clipboard
Real User Monitoring and telemetry package for Flutter, performance tracking, and local reporting.
Changelog #
1.3.10 - 2025-01-31 #
🆔 Device Identification System #
New DeviceIdManager
- NEW: Persistent device identification across app sessions
- Device IDs follow format:
device_<timestamp>_<random>_<platform> - Example:
device_1704067200000_a8b9c2d1_android - Automatically generated on first app install
- Persists across app restarts and sessions
- Platform-aware: android, ios, web, windows, macos, linux, fuchsia
Enhanced Device Info Collection
- NEW:
device.idattribute added to all telemetry events and metrics - Integrated with FlutterDeviceInfoCollector for seamless collection
- Graceful error handling if device ID generation fails
- Format validation ensures data integrity
Debug Logging Enhancements
- Device ID now appears in EdgeTelemetry initialization logs
- Format validation logging for troubleshooting
- Enhanced debug output:
🆔 Device ID: device_xxx_xxx_platform
🔧 Technical Implementation #
- Added
DeviceIdManagerclass with persistent storage via SharedPreferences - Updated
FlutterDeviceInfoCollectorto include device ID in collection - Enhanced main
EdgeTelemetryclass with device ID validation and logging - In-memory caching for performance optimization
- Comprehensive error handling with fallback strategies
📊 Device Attributes (Auto-Added to All Events) #
{
"device.id": "device_1704067200000_a8b9c2d1_android",
"device.model": "Pixel 7",
"device.manufacturer": "Google",
"device.platform": "android",
"app.name": "My App",
"user.id": "user_1704067200123_abcd1234",
"session.id": "session_1704067200456_xyz789"
}
🎯 Benefits #
- Unique Device Tracking: Persistent device identification across sessions
- Enhanced Analytics: Better device-level insights and user journey tracking
- Data Quality: Format validation ensures consistent device identification
- Performance Optimized: Sub-millisecond response after first generation
- Privacy Conscious: Device IDs are app-specific and locally generated
1.2.4 - 2024-12-19 #
🔥 Major Changes #
Auto-Generated User IDs
- BREAKING: Removed
setUser()method - user IDs are now auto-generated - User IDs are automatically created on first app install and persist across sessions
- New on each app reinstall, same across app sessions
- No developer intervention needed
Enhanced Session Tracking
- All telemetry data now includes comprehensive session details
- Session counters track events, metrics, and screen visits in real-time
- First-time user detection and total session counting
✨ New Features #
User Profile Management
setUserProfile()- Set name, email, phone (optional)clearUserProfile()- Clear profile data (keeps user ID)currentUserId- Get auto-generated user ID (read-only)currentUserProfile- Get current profile data (read-only)currentSessionInfo- Get live session statistics
Session Attributes (Auto-Added to All Events)
{
"session.id": "session_123456789_android",
"session.start_time": "2024-12-19T15:30:45.123Z",
"session.duration_ms": "120000",
"session.event_count": "25",
"session.metric_count": "12",
"session.screen_count": "3",
"session.visited_screens": "home,profile,settings",
"session.is_first_session": "true",
"session.total_sessions": "1"
}
📦 Dependencies #
- Added
shared_preferences: ^2.3.3for persistent storage
💻 API Changes #
Before (v1.1.3)
// Manual user ID management
EdgeTelemetry.instance.setUser(
userId: 'user-123', // Manual
email: 'user@example.com',
name: 'John Doe',
);
After (v1.2.0)
// Auto user ID + optional profile
await EdgeTelemetry.initialize(/* auto user ID generated */);
EdgeTelemetry.instance.setUserProfile(
name: 'John Doe',
email: 'user@example.com',
phone: '+1234567890', // NEW
);
🔧 Internal Changes #
- Added
UserIdManagerfor persistent user ID generation - Added
SessionManagerfor session lifecycle and statistics - Enhanced global attributes with automatic session injection
- Navigation tracking now updates session screen counters
- All telemetry events automatically include user ID and session details
🎯 Benefits #
- Simplified Setup: No manual user ID management required
- Rich Context: Every event includes complete user and session information
- Better Analytics: Track user journeys, session quality, and engagement
- Privacy Friendly: User IDs are app-specific and reset on reinstall