-
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 UnitclearAllData()Clears all unsent data in all registered features. 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.
-
clearAllData
@AnyThread() abstract Unit clearAllData()
Clears all unsent data in all registered features.
-
getService
abstract String getService()
Name of the service (given during the SDK initialization, otherwise package name is used).
-
-
-
-