FAQ About Using LTS SDKs
This section provides answers to common issues and questions you may have when using LTS SDKs.
- What Are the Precautions for Reporting Logs to LTS via the Device SDKs?
Before using the device SDKs, you are advised to disable log reporting with one click and then gradually increase the reporting traffic to prevent potential failures. If your mobile device is expected to generate a very high volume of logs, notify LTS technical support in advance to reserve resources.
- Which API of the Device SDKs Should I Use: report or reportImmediately?
The report API is recommended for general logs. It allows you to adjust reporting policies, such as the reporting interval and size. For critical data, use the reportImmediately API to report it instantly.
- Where Should I Place Data: in the labels or contents Parameter?
Use the labels parameter for fixed data (such as user ID, device model, channel, system, and network) to enable dimension analysis. For all other data, you are advised to place it in the contents parameter.
- What Are the Impacts on the App Size and Performance After the SDK Package Is Integrated?
The app size increases by about 50 KB on iOS and about 200 KB on Android. The increase for web apps is negligible. Uploading up to 100 logs per second does not affect performance.
- What Versions of iOS and Android SDKs Are Supported?
The iOS SDK supports iOS 10 and later, and the Android SDK supports Android 7 and later. If you need to support an earlier version, submit a service ticket.
- Why Can't I Query Reported Log Data on the LTS Console?
First, check whether the AK, SK, region, and projectId parameters are correct. For more information, see Using SDKs to Ingest Logs to LTS. Next, check your app for error codes. For details, see Error Codes. Finally, ensure your device has been added to LTS's whitelist. If not, submit a service ticket.
- What Do I Do If My App Fails to Report Logs and Displays Error Code 403?
Check whether anonymous reporting is enabled for your log stream on the LTS console. For details about how to enable anonymous write, see Managing Log Streams.
- What If the SDK Initialization Fails?
Enable the debug mode to print each parameter. Based on the printed information, locate the cause of the initialization failure.
- What Are the Length and Size Limits of a Log Reported by a Device?
A log can contain a maximum of 30,720 characters. Any log exceeding this limit will be truncated before being reported to LTS as a string. The maximum size for a log that can be reported is 1 MB.
- What Are the Log Reporting Policies of the Device SDKs?
The log reporting policies can be customized in the time and space dimensions. The default reporting interval is 3s, and the default number of reported logs is 200. Logs are reported as soon as either of these conditions is met.
- Are Logs Reported by the Device SDKs Sent Asynchronously or Synchronously?
- What Is the Maximum Number of Logs a Device SDK Can Report to LTS?
The number of logs a device SDK can report to LTS depends on your resource capacity. Theoretically, there is no limit on the number of concurrent logs, provided your LTS has sufficient resources. If you need to report more logs concurrently via a device SDK, submit a service ticket.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot