Class EventTrackerV2

java.lang.Object
datadog.appsec.api.login.EventTrackerV2

public class EventTrackerV2 extends Object
  • Constructor Details

    • EventTrackerV2

      public EventTrackerV2()
  • Method Details

    • setEventTrackerService

      public static void setEventTrackerService(EventTrackerService service)
      Controls the implementation for service. The AppSec subsystem calls this method on startup. This can be called explicitly for e.g. testing purposes.
      Parameters:
      service - the implementation for the user service.
    • trackUserLoginSuccess

      public static void trackUserLoginSuccess(String login, String userId, Map<String,String> metadata)
      Tracks a successful user login event.
      Parameters:
      login - the non-null login data (e.g., username or email) used for authentication.
      userId - an optional user ID string; can be null.
      metadata - optional metadata for the login event; can be null.
    • trackUserLoginFailure

      public static void trackUserLoginFailure(String login, boolean exists, Map<String,String> metadata)
      Tracks a failed user login event.
      Parameters:
      login - the non-null login data (e.g., username or email) used for authentication.
      exists - indicates whether the provided login identifier corresponds to an existing user.
      metadata - optional metadata for the login event; can be null.
    • trackCustomEvent

      public static void trackCustomEvent(String eventName, Map<String,String> metadata)
      Method for tracking custom events.
      Parameters:
      eventName - name of the custom event
      metadata - custom metadata data represented as key/value map