This paper mainly describes a system idea, for many companies do not have enough technical personnel to build a complete set of full link log system for reference, for details of the implementation, you can design according to the characteristics of their own products, if there is any doubt, You can send me an email at [email protected] or add my wechat account [the51alien] to make a note of “Tiansoo”. It is your first post and please correct any mistakes


Pain points

The implementation of any technology will be of no value if it does not solve some problem or other

I believe that many mobile developers will encounter a problem. When customer service receives user feedback, a page of the APP cannot be opened, or a button cannot be clicked and other non-crash functional abnormalities. In the absence of the full link log of the user, we generally adopt the following methods to deal with it

  • As a rule of thumb, check the logic in your code to see if there are boundary cases that aren’t taken into account

  • According to the user’s scenario description, simulate a copy of the same data in the test environment to see if it can be reproduced

  • Obtain user authorization, use the login token to enter the problem scenario to see if it can reproduce (there is no way, most users will refuse)

If the above steps can not be solved, I believe that many people will be the following expression

So is there a quick and direct way to help the hard-working programmer solve these problems? The answer is yes – use the shoulders of giants


Tissot system flow chart

You will find that there are three giants supporting the whole system

The giant Duties and responsibilities requirements
Cloud push platform Deliver the log collection command to the target user High arrival rate, combined wake-up function
Cloud resource storage platform The APP link logs uploaded by users on the abnormal day are saved Large capacity, high security
Hot patch distribution platform Issued by the patch High success rate, high real-time, high compatibility

Let me go through the tasks and mechanics of each system

  • The blue line part – the client to the user’s daily operation and orderly web logs, compression, encryption, additional written to a local file, you can manually buried or AOP automation buried PM, believe a lot of people in the use of okhttp blogs on the Internet, can be in the interceptor log writing, all operations must be performed in a child thread, Filename to [“. “+” – “+ app name + user id +” – “+ date (yyyy – MM – dd)] way of hiding, suffixes using JPG to disguised as a broken picture

  • Yellow line – Starting from the client, I believe that the node is easy to understand for technical personnel. Finally, I use push tag instead of push ID as the parameter for push platform, which is also a common situation of multi-client login in the market. Push tag- Push ID is a one-to-many mapping relationship. Each user logs in to a device and tags the push ID of the device manually. In this case, the user ID is used for the tag

  • The red line -APP will receive a special JSON format push, for example{"data":{"type":1024,"date":"2018-06-05"}}, the client push system captures this instruction after call log system upload method, choose the corresponding date of upload log cloud storage platform, so that technical staff can get the log, through local tools, will read the file content, decryption, decompression, functional data that are relevant to problem mork repetition in the APP

  • The black line — this is shown here, and I’m sure many of you can do this, so I won’t elaborate


The problem

Ideal is beautiful, reality is cruel

  1. Push problem is believed to be the biggest headache for Android developers. If the technical staff does not see the user log within ten minutes after sending the push instruction, the customer service can only remind the user to open the APP again, and the offline push of a good push platform will be triggered again
  2. Patch problem, patch repair real-time and success rate determines the last step, otherwise only a new version
  3. You are advised to reserve only the logs of the latest week to prevent massive garbage files

Afterword.

Something to talk about over dinner

The name tissot comes from my imagination of a system scenario, like a shuttle shuttling back and forth in a virtual sky network of users’ mobile phones plus three platform servers

At present, the giants I use are push + 7 Niuyun + Bugly hot patch distribution platform, and the free threshold of these three platforms is enough to use