Assassin’s Creed, Temple Run, Satellite Reign, Rust — these are just a few of the games developed using Unity’s content-creation engine, which millions of professional developers and artists, hobbyists, and students around the world use to create 2D, 3D, and VR/AR experiences. More than 700 million people interact with games developed with Unity, which are downloaded billions of times a month on mobile phones, gaming consoles and PCs.
The Unity engine makes it easy for developers to deploy content to a wide variety of different operating systems, platforms and devices — Android, iOS, Windows, Mac, Linux, PlayStation, XBox — the list goes on. Before the SDKs are released to the game developers, they are thoroughly tested to ensure seamless performance.
This support matrix means that Unity’s own developers are constantly pushing new code builds into the company’s continuous integration pipeline, a pipeline that consists of hundreds of thousands of builds, or approximately 250,000 a month.
As with any Continuous Integration pipeline, builds trigger tests that make sure the product works without fault on all the supported devices. At Unity, the Build Farm team is in charge of troubleshooting, monitoring and analyzing these builds. This task is done using log data generated by the process — build logs, test logs and device logs. The myriad of supported devices, as well as the large amount of builds, results in a large amount of log data.
Initially, if an error was reported, the Build Farm team was tasked with accessing the build servers, searching for the specific log files and then analyzing the data to troubleshoot the issue. Needless to say, this manual process was time-consuming and labor intensive. The team at Unity felt it required a solution that would not only take away the heavy lifting involved in manually collecting large amounts of log data, but also enabled more efficient and proactive analysis.
Using Logz.io, Unity is now able to dramatically cut the operational time spent on what were manual data analysis processes. Moving to a centralized and hosted logging solution that offers proactive analysis tools, the team is now able to gain more visibility into the data, identify and uncover issues that would otherwise have gone unnoticed, and ultimately, differentiate between the data that matters and the data that does not.
In one case, Logz.io’s Cognitive Insights feature — a machine learning technology that scans log data and uncovers hidden issues together with actionable data and links to relevant resources — was used to identify a bug existing in legacy code being tested. Cognitive Insights identified a correlation between a specific log message and an old Unity forum on the web that discussed the bug and ways to troubleshoot it. Thus, an event that would otherwise have gone totally undetected was identified, and they were able to troubleshoot it swiftly.
Using Logz.io’s built-in alerting mechanism, various alerts have been created, notifying the team on a variety of different issues. An alert is triggered, for example, if a connection with one of the supported and tested devices is lost. License expirations and Filebeat instances going offline are other examples of alerts the team at Unity has created.
Unity has constructed a variety of different dashboards to closely monitor builds and related processes. One example is a dashboard that monitors the activity of a cleanup script created by the Build Farm team. Builds leave a trail of unnecessary files behind them, which can quickly amount to TBs of data. A cleanup script was created to scan through the build data and remove these files, and the team built a dashboard to monitor its activity — the amount of data cleaned as well as the processes left behind.
The visibility into the log data gained by using Logz.io has also helped Unity discern between important data and irrelevant data. This has enabled the team to educate the developers on logging best practices that result in logs that are both important and useful.
In total, the 250,000 builds a month pushed by developers at Unity result in 250GB of log data shipped to Logz.io a day. This data is analyzed by multiple teams at Unity, with more than 30 different users accessing the platform and analyzing the data.
Logz.io has helped Unity save valuable engineering time that was previously spent on manual and inefficient operational logging tasks. Using Logz.io, Unity’s Build Farm can identify and troubleshoot issues faster, ultimately boosting development and facilitating faster application delivery.
Claus Nielsen, DevOps Engineer at Unity, sums it up: “Logz.io has really helped us gain insight from our own data. We had already tried an in-house ELK deployment, and the move to Logz.io has proven itself as being extremely valuable to us. Their constant care for the product, and their keen focus on what provides value for their customers, has saved us both time and money we would otherwise have to spend on maintaining our own system.”