-
public interface SdkCoreSdkCore is the entry point to register Datadog features to the core registry.
-
-
Method Summary
Modifier and Type Method Description abstract BooleanisCoreActive()Returns true if the core is active. abstract UnitsetTrackingConsent(TrackingConsent consent)Sets the tracking consent regarding the data collection for this instance of the Datadog SDK. abstract UnitsetUserInfo(String id, String name, String email, Map<String, Object> extraInfo)Sets the user information. abstract UnitaddUserProperties(Map<String, Object> extraInfo)Sets additional information on the UserInfo objectIf properties had originally been set with SdkCore.setUserInfo, they will be preserved. abstract UnitclearUserInfo()Clear the current user information. abstract UnitclearAllData()Clears all unsent data in all registered features. abstract UnitsetAccountInfo(String id, String name, Map<String, Object> extraInfo)Sets current account information. abstract UnitaddAccountExtraInfo(Map<String, Object> extraInfo)Add custom attributes to the current account informationThis extra info will be added to already existing extra info that is added to logs traces and RUM events automatically. abstract UnitclearAccountInfo()Clear the current account informationAccount information will set to null Following Logs, Traces, RUM Events will not include the account information anymore. abstract StringgetName()Name of the current SDK instance. abstract TimeInfogetTime()The current time (both device and server). abstract StringgetService()Name of the service (given during the SDK initialization, otherwise package name is used). -
-
Method Detail
-
isCoreActive
@AnyThread() abstract Boolean isCoreActive()
Returns true if the core is active.
-
setTrackingConsent
@AnyThread() abstract Unit setTrackingConsent(TrackingConsent consent)
Sets the tracking consent regarding the data collection for this instance of the Datadog SDK.
- Parameters:
consent- which can take one of the values (TrackingConsent.PENDING, TrackingConsent.GRANTED, TrackingConsent.NOT_GRANTED)
-
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 aliasemail- (nullable) the user emailextraInfo- additional information.
-
addUserProperties
@AnyThread() abstract Unit addUserProperties(Map<String, Object> extraInfo)
Sets additional information on the UserInfo object
If properties had originally been set with SdkCore.setUserInfo, they will be preserved. In the event of a conflict on key, the new property will prevail.
- Parameters:
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
usrattribute cleared.If you want to retain the current
usron the active RUM session, you need to stop the session first by usingGlobalRumMonitor.get().stopSession()If you want to retain the current
usron the active RUM views, you need to stop the view first by usingGlobalRumMonitor.get().stopView()
-
clearAllData
@AnyThread() abstract Unit clearAllData()
Clears all unsent data in all registered features.
-
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
accountattribute clearedIf you want to retain the current
accounton the active RUM session, you need to stop the session first by usingGlobalRumMonitor.get().stopSession()If you want to retain the current
accounton the active RUM views, you need to stop the view first by usingGlobalRumMonitor.get().stopView()
-
getService
abstract String getService()
Name of the service (given during the SDK initialization, otherwise package name is used).
-
-
-
-