-
public class DatadogThis class initializes the Datadog SDK, and sets up communication with the server.
-
-
Field Summary
Fields Modifier and Type Field Description private final _InternalProxy_internalpublic final static DatadogINSTANCE
-
Method Summary
Modifier and Type Method Description final static Unitinitialize(Context context, Credentials credentials, Configuration configuration, TrackingConsent trackingConsent)Initializes the Datadog SDK. final static BooleanisInitialized()Checks if the Datadog SDK was already initialized. final static UnitclearAllData()Clears all data that has not already been sent to Datadog servers. final static UnitsetVerbosity(Integer level)Sets the verbosity of the Datadog library. final static UnitsetTrackingConsent(TrackingConsent consent)Sets the tracking consent regarding the data collection for the Datadog library. final static UnitsetUserInfo(String id, String name, String email, Map<String, Object> extraInfo)Sets the user information. final static UnitsetUserInfo(String id, String name, String email)Sets the user information. final static UnitsetUserInfo(String id, String name)Sets the user information. final static UnitsetUserInfo(String id)Sets the user information. final static UnitsetUserInfo()Sets the user information. final static UnitaddUserExtraInfo(Map<String, Object> extraInfo)Sets additional information on the UserInfo objectIf properties had originally been set with Datadog.setUserInfo, they will be preserved. final static UnitaddUserExtraInfo()Sets additional information on the UserInfo objectIf properties had originally been set with Datadog.setUserInfo, they will be preserved. final static UnitenableRumDebugging(Boolean enable)Utility setting to inspect the active RUM View. final _InternalProxyget_internal()For Datadog internal use only. -
-
Method Detail
-
initialize
final static Unit initialize(Context context, Credentials credentials, Configuration configuration, TrackingConsent trackingConsent)
Initializes the Datadog SDK.
- Parameters:
context- your application contextcredentials- your organization credentialsconfiguration- the configuration for the SDK librarytrackingConsent- as the initial state of the tracking consent flag.
-
isInitialized
final static Boolean isInitialized()
Checks if the Datadog SDK was already initialized.
-
clearAllData
final static Unit clearAllData()
Clears all data that has not already been sent to Datadog servers.
-
setVerbosity
final static Unit setVerbosity(Integer level)
Sets the verbosity of the Datadog library.
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).
-
setTrackingConsent
final static Unit setTrackingConsent(TrackingConsent consent)
Sets the tracking consent regarding the data collection for the Datadog library.
- Parameters:
consent- which can take one of the values (TrackingConsent.PENDING, TrackingConsent.GRANTED, TrackingConsent.NOT_GRANTED)
-
setUserInfo
@JvmOverloads() final static 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.
-
setUserInfo
@JvmOverloads() final static Unit setUserInfo(String id, String name, String email)
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 email
-
setUserInfo
@JvmOverloads() final static Unit setUserInfo(String id, String name)
Sets the user information.
- Parameters:
id- (nullable) a unique user identifier (relevant to your business domain)name- (nullable) the user name or alias
-
setUserInfo
@JvmOverloads() final static Unit setUserInfo(String id)
Sets the user information.
- Parameters:
id- (nullable) a unique user identifier (relevant to your business domain)
-
setUserInfo
@JvmOverloads() final static Unit setUserInfo()
Sets the user information.
-
addUserExtraInfo
@JvmOverloads() final static Unit addUserExtraInfo(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.
-
addUserExtraInfo
@JvmOverloads() final static Unit addUserExtraInfo()
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.
-
enableRumDebugging
final static Unit enableRumDebugging(Boolean enable)
Utility setting to inspect the active RUM View. If set, a debugging outline will be displayed on top of the application, describing the name of the active RUM View. May be used to debug issues with RUM instrumentation in your app.
- Parameters:
enable- if enabled, then app will show an overlay describing the active RUM view.
-
get_internal
final _InternalProxy get_internal()
For Datadog internal use only.
-
-
-
-