Package 

Interface SdkCore


  • 
    public interface SdkCore
    
                        

    SdkCore is the entry point to register Datadog features to the core registry.

    • Method Detail

      • setUserInfo

        @AnyThread() abstract Unit setUserInfo(String id, String name, String email, Map<String, Object> extraInfo)

        Sets the user information.

        Parameters:
        id - a unique user identifier (relevant to your business domain)
        name - (nullable) the user name or alias
        email - (nullable) the user email
        extraInfo - additional information.
      • clearUserInfo

        @AnyThread() abstract Unit clearUserInfo()

        Clear the current user information.

        User information will be set to null. After calling this api, Logs, Traces, RUM Events will not include the user information anymore.

        Any active RUM Session, active RUM View at the time of call will have their usr attribute cleared.

        If you want to retain the current usr on the active RUM session, you need to stop the session first by using GlobalRumMonitor.get().stopSession()

        If you want to retain the current usr on the active RUM views, you need to stop the view first by using GlobalRumMonitor.get().stopView()

      • setAccountInfo

         abstract Unit setAccountInfo(String id, String name, Map<String, Object> extraInfo)

        Sets the account information that the user is currently logged into.

        This API should be used to assign an identifier for the user's account which represents a contextual identity within the app, typically tied to business or tenant logic. The information set here will be added to logs, traces and RUM events.

        This value should be set when user logs in with his account, and cleared by calling clearAccountInfo when he logs out.

        Parameters:
        id - Account ID.
        name - representing the account, if exists.
        extraInfo - Account custom attributes, if exists.
      • addAccountExtraInfo

         abstract Unit addAccountExtraInfo(Map<String, Object> extraInfo)

        Add custom attributes to the current account information.

        This extra info will be added to already existing extra info that is added to Logs, Traces and RUM events automatically.

        Parameters:
        extraInfo - Account additional custom attributes.
      • clearAccountInfo

         abstract Unit clearAccountInfo()

        Clear the current account information.

        Account information will be set to null. Following Logs, Traces, RUM Events will not include the account information anymore.

        Any active RUM Session, active RUM View at the time of call will have their account attribute cleared.

        If you want to retain the current account on the active RUM session, you need to stop the session first by using GlobalRumMonitor.get().stopSession().

        If you want to retain the current account on the active RUM views, you need to stop the view first by using GlobalRumMonitor.get().stopView().

      • getName

         abstract String getName()

        Name of the current SDK instance.

      • getTime

         abstract TimeInfo getTime()

        The current time (both device and server).

      • getService

         abstract String getService()

        Name of the service (given during the SDK initialization, otherwise package name is used).