-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add telemetry [#81] #94
base: main
Are you sure you want to change the base?
Conversation
@@ -5,4 +5,10 @@ sealed class ClerkConstants { | |||
|
|||
/// value for the `x-flutter-sdk-version` header in API requests | |||
static const flutterSdkVersion = '0.0.4-dev'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's auto-generate this.
@@ -1,12 +1,61 @@ | |||
import 'dart:convert'; | |||
|
|||
/// Extensions to the [Map] class | |||
extension MapExtension on Map { | |||
extension MapExtension<T, S> on Map<T, S> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets replace with this the one from package:collection
Map<String, dynamic> payload, | ||
) async { | ||
if (_mountingHasBeenReported == false) { | ||
await auth.sendTelemetry('COMPONENT MOUNTED', payload: payload); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clerk.auth.telemetry.sendComponentMounted(compontent, telemetryPayload());
/// An abstract class overriding state which allows telemetry | ||
/// events to be generated as widgets are mounted and disposed | ||
/// | ||
abstract class TelemetricState<T extends TelemetricStatefulWidget> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convert to mixin
Resolves #81