integrationlatestIntegration / Real-time debugging
Real-time debugging
Note
The SDK Debug mode is only for debugging during integration. Never use it in the production environment.
Enable log printing
ThinkingData::set_enable_log(true)
Verify data validity in Debug mode
During SDK integration, you can use the AE Debug feature for real-time debugging. To use the Debug feature, complete the following two steps:
- Use TDDebugConsumer
The following sample code uses TDDebugConsumer:
consumer = ThinkingData::TDDebugConsumer.new('SERVER_URL', 'APPID', device_id: "123456789")
ta = ThinkingData::TDAnalytics.new(consumer)
DEMO_ACCOUNT_ID = '123'
DEMO_DISTINCT_ID = 'aaa'
properties = {
array: ["str1", "11", Time.now, "2020-02-11 17:02:52.415"],
prop_date: Time.now,
prop_double: 134.1,
prop_string: 'hello world',
prop_bool: true,
}
ta.track(event_name: 'test_event', distinct_id: DEMO_DISTINCT_ID, account_id: DEMO_ACCOUNT_ID, properties: properties)
Debug mode may affect data collection quality and App stability. Use it only to verify data during integration, and don't use it in the production environment.
Was this page helpful?

