tencent cloud

Tencent Cloud Observability Platform

SDK Integration

Download
Focus Mode
Font Size
Last updated: 2026-05-25 18:01:57
This article describes how to integrate the log SDK using automatic integration.

Prerequisites

Before integration, ensure that you have created an application in Terminal Performance Monitoring Pro (RUM Pro) and obtained the corresponding AppKey and AppID.

Automatic Integration

1. Add the Maven repository address in the project-level build.gradle file.
repositories {
maven { url 'https://repo1.maven.org/maven2/' }
}
2. Add dependencies and attribute configurations in the module's build.gradle file.
dependencies {
// Logger (optional)
// If you need the STL static linking version, replace "logger" with "logger-static".
implementation 'com.tencent.tdos-diagnose:logger:0.4.11'
// Diagnose
implementation 'com.tencent.tdos-diagnose:diagnose:0.4.11'
}
Note:
The STL dynamic linking version of the Logger module uses libc++_shared. If your project already includes this library, the dynamic linking version will result in a smaller APK size. If your project does not include libc++_shared or has other conflicting STL implementations, you can choose the static linking version instead.

Verifying the Release Build (Obfuscation)

After completing the above steps, verify that the obfuscated APK works properly (such as log printing, command issuing, and active reporting).
Generally, no additional configuration is required, as the platform log AAR already includes the obfuscation rules in proguard.txt. However, if you find that the obfuscated APK does not work properly, your build tools may not support automatic ProGuard configuration. In this case, you can try manually configuring the ProGuard rules to resolve the issue.
// Logger
-keep class com.tencent.mars.xlog.** { *; }
// Diagnose
-keep class com.tencent.tddiag.protocol.* { public *; }
-keep class com.tencent.tddiag.upload.UploadTask { public *; }


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback