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

Add auth_addConnection telemetry provider #244

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

Conversation

taldekar
Copy link
Contributor

Description of changes:

  • Suggest a provider design for auth telemetry components.

Requirements:

  • Dynamic Field Population: Allow immediate and partial filling of telemetry event fields as data becomes available, supporting incremental updates.
  • Timeout-based Incomplete Event Transmission: Implement logic to automatically send telemetry data for incomplete authentication attempts after a configurable timeout period, ensuring capture of partial or abandoned login sessions.
  • Data Persistence and Comprehensive Field Tracking: Store and maintain all field values (user-input, pre-populated, and unchanged) from current and previous login attempts, ensuring complete telemetry reporting even when fields are not explicitly updated in the input form during the authentication process.
  • State Management: Implement rules to reset fields or retain specific data, based on configurable triggers.
  • Data Validation: Verify incoming data against expected formats and ranges. Handle or report invalid inputs, or allow data sources to provide this information.

Flows:

  1. Session Tracking and Authentication:
  • A session is initiated when the login page opens, indicating an active authentication attempt.
  • Each session lasts for 2 minutes but this is configurable.
  • If authentication is not completed within this timeframe, a timeout occurs and an "incomplete authentication" event is emitted.
  • After an incomplete event, the session automatically restarts, and will be available to be completed successfully or unsuccessfully.
  • Previously entered data persists in the provider and is available for subsequent authentication attempts.
  1. Session Cancellation
  • A session can be manually cancelled at any time (by closing the login window).
  • Upon cancellation, a "cancelled" event is emitted.
  • No new session is automatically started after cancellation.
  1. Data Population and Completion:
  • Authentication fields can be populated progressively as information becomes available.
  • Once authentication is successfully completed, the it returns a metric datum that can either be used to hydrate the telemetry events coming from the language server or forwarded in its own event (in case of incomplete or cancelled flows).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

}

public static MetricDatum completed(final Boolean success) {
if (!timeoutFuture.isDone()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should look to get confirmation if clicking the cancel button during the auth flow should register as an attempt or not.

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

Successfully merging this pull request may close these issues.

2 participants