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 - (nullable) 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 current account information.

        Those will be added to logs, traces and RUM events automatically.

        Parameters:
        id - Account ID.
        name - representing the account, if exists.
        extraInfo - Account's 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's additional custom attributes.
      • clearAccountInfo

         abstract Unit clearAccountInfo()

        Clear the current account information

        Account information will 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).