Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: add telemetry [#81] #94

wants to merge 1 commit into from

Conversation

shinyford
Copy link
Collaborator

Resolves #81

@shinyford shinyford added clerk_auth package: clerk_auth clerk_flutter package: clerk_flutter labels Jan 9, 2025
@shinyford shinyford added this to the v0.0.6-dev milestone Jan 9, 2025
@shinyford shinyford requested a review from slightfoot January 9, 2025 11:41
@shinyford shinyford self-assigned this Jan 9, 2025
@@ -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';
Copy link
Collaborator

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.

packages/clerk_auth/lib/clerk_constants.dart Show resolved Hide resolved
@@ -1,12 +1,61 @@
import 'dart:convert';

/// Extensions to the [Map] class
extension MapExtension on Map {
extension MapExtension<T, S> on Map<T, S> {
Copy link
Collaborator

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);
Copy link
Collaborator

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>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Convert to mixin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clerk_auth package: clerk_auth clerk_flutter package: clerk_flutter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add telemetry
2 participants