-
public interface SdkCoreSdkCore is the entry point to register Datadog features to the core registry.
-
-
Method Summary
Modifier and Type Method Description abstract UnitregisterFeature(String featureName, FeatureStorageConfiguration storageConfiguration, FeatureUploadConfiguration uploadConfiguration)Registers a feature to this instance of the Datadog SDK. abstract FeatureScopegetFeature(String featureName)Retrieves a registered feature. abstract UnitsetVerbosity(Integer level)Sets the verbosity of this instance of the Datadog SDK. abstract IntegergetVerbosity()Gets the verbosity of this instance of the Datadog SDK. abstract UnitsetTrackingConsent(TrackingConsent consent)Sets the tracking consent regarding the data collection for this instance of the Datadog SDK. abstract UnitsetUserInfo(UserInfo userInfo)Sets the user information. abstract UnitaddUserProperties(Map<String, Object> extraInfo)Sets additional information on the UserInfo objectIf properties had originally been set with Datadog.setUserInfo, they will be preserved. abstract Unitstop()Stops all process for this instance of the Datadog SDK. abstract UnitclearAllData()Clears all unsent data in all registered features. abstract UnitflushStoredData()Flushes all stored data (send everything right now). abstract UnitupdateFeatureContext(String featureName, Function1<Map<String, Object>, Unit> updateCallback)Updates the context if exists with the new entries. abstract Map<String, Object>getFeatureContext(String featureName)Retrieves the context for the particular feature. abstract UnitsetEventReceiver(String featureName, FeatureEventReceiver receiver)Sets event receiver for the given feature. abstract UnitremoveEventReceiver(String featureName)Removes events receive for the given feature. abstract TimeInfogetTime()The current time (both device and server). -
-
Method Detail
-
registerFeature
abstract Unit registerFeature(String featureName, FeatureStorageConfiguration storageConfiguration, FeatureUploadConfiguration uploadConfiguration)
Registers a feature to this instance of the Datadog SDK.
- Parameters:
featureName- the name of the featurestorageConfiguration- the configuration for storing tracked datauploadConfiguration- the configuration for uploading stored data
-
getFeature
abstract FeatureScope getFeature(String featureName)
Retrieves a registered feature.
- Parameters:
featureName- the name of the feature to retrieve
-
setVerbosity
abstract Unit setVerbosity(Integer level)
Sets the verbosity of this instance of the Datadog SDK.
Messages with a priority level equal or above the given level will be sent to Android's Logcat.
- Parameters:
level- one of the Android android.util.Log constants (android.util.Log.VERBOSE, android.util.Log.DEBUG, android.util.Log.INFO, android.util.Log.WARN, android.util.Log.ERROR, android.util.Log.ASSERT).
-
getVerbosity
abstract Integer getVerbosity()
Gets the verbosity of this instance of the Datadog SDK.
Messages with a priority level equal or above the given level will be sent to Android's Logcat.
-
setTrackingConsent
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
abstract Unit setUserInfo(UserInfo userInfo)
Sets the user information.
- Parameters:
userInfo- the new user info to set, or null
-
addUserProperties
abstract Unit addUserProperties(Map<String, Object> extraInfo)
Sets additional information on the UserInfo object
If properties had originally been set with Datadog.setUserInfo, they will be preserved. In the event of a conflict on key, the new property will prevail.
- Parameters:
extraInfo- additional information.
-
clearAllData
abstract Unit clearAllData()
Clears all unsent data in all registered features.
-
flushStoredData
abstract Unit flushStoredData()
Flushes all stored data (send everything right now).
-
updateFeatureContext
abstract Unit updateFeatureContext(String featureName, Function1<Map<String, Object>, Unit> updateCallback)
Updates the context if exists with the new entries. If there is no context yet for the provided featureName, a new one will be created.
- Parameters:
featureName- Feature name.updateCallback- Provides current feature context for the update.
-
getFeatureContext
abstract Map<String, Object> getFeatureContext(String featureName)
Retrieves the context for the particular feature.
- Parameters:
featureName- Feature name.
-
setEventReceiver
abstract Unit setEventReceiver(String featureName, FeatureEventReceiver receiver)
Sets event receiver for the given feature.
- Parameters:
featureName- Feature name.receiver- Event receiver.
-
removeEventReceiver
abstract Unit removeEventReceiver(String featureName)
Removes events receive for the given feature.
- Parameters:
featureName- Feature name.
-
-
-
-