I heard that you also encountered this problem?

Xiao Wang is a programmer. Recently, he encountered a headache when using FaaS (Function as a Service) service: His FaaS application reported many errors, but there were too many requests to call the log page. Quickly find out the cause of a bug.

For Xiao Wang, it was a common thing to check his application for errors during development, operation and maintenance. Before, Xiao Wang could check the keywords in the log printed locally on the server to check whether the logic is correct, and then check and execute. The error message in the environment, the root cause of the error is basically found. Now, when Xiao Wang deploys the application to the cloud and delivers the business to the FaaS service provider for execution, he can only rely on the log solution provided by the FaaS service provider to query the relevant debug information. There is no way to debug on the server. , you can directly investigate the cause of the error and fix it.

Because of this problem, Xiao Wang has to search with his eyes a little bit in the request list of dozens or hundreds of call logs every day, and his eyes are really going to be useless, so Xiao Wang, who couldn't bear it, turned on the self-rescue mode...
在这里插入图片描述

How do mainstream functional computing products respond?

Xiao Wang compared the current mainstream function computing products in China and found that these products have three things in common at the log level:

a. All rely on their own log service system as log storage support;
b. Expose the request list page to the user, and each request contains all the logs of the request;
c. Both support jumping to the log service for independent query, and support multiple functions to write to the same log warehouse

The above three common points seem to be quite satisfactory. They all use their own mature log services as log storage systems, which not only ensure log security, but also provide a good query experience; request-oriented logs are also naturally isolated for users. , which is also in line with the event-driven tonality of FaaS; however, the practice of supporting jumping to the bound log service product may be mixed. There is no problem in terms of comprehensiveness and accuracy, and the bound log service can be used as the source-of-truth of user business logs.

The bad thing is that when users are faced with a vast amount of log information, which is mixed with information of multiple applications and configuration information of cloud services, it will undoubtedly increase the cost of use, and it takes a long time to learn to use the self-service query function well. cycle. The developer is most concerned about errorStack when debugging, but in the log service, more useless information comes into view.

what you need and what you see
在这里插入图片描述

Alibaba Cloud Function Compute helps you locate problems at a glance

Optimizing the user's log query experience - text-oriented logs

In order to make it more comfortable for users, Alibaba Cloud Function Computing (FC) launched a new log keyword search function in this year, which is now online. , quickly locate the request log, and keep your eyes peeled.

(1) Text-oriented logs

On the call log - keyword search page, developers can see complete and detailed business logs of the current function (including function initialization, call logs), where developers only focus on text, and function computing helps you get rid of the log service page other useless information.

在这里插入图片描述

(2) Support query and highlight

When developers use keywords to search, they can customize the typed text. Like the user in the picture, you can directly type in the order number and other characteristic information in the search box to query the log information you want.

For details, please visit the link below:

https://www.bilibili.com/video/BV1Cr4y1i7aU/

(3) Support simple query statement association operations

The keyword query search box supports the use of AND, OR, NOT and other fields to link text (consistent with the log service syntax), providing the possibility for users to fine-tune searches.

For details, please visit the link below:
https://www.bilibili.com/video/BV1ZS4y1m7Tf/

(4) More friendly to custom Runtime

For custom-runtime, custom-container and other runtimes that need to be highly customized by users, text-oriented log display and keyword search are also supported, so that the logs of container startup are also naturally displayed to users.

Alibaba Cloud Function Compute (FC) takes the classic python-flask framework of custom-container as an example, you can see the container startup, and the logs of the python flask server startup can also be displayed on the console. In the same way, the logs of the initializer and custom Runtime can be collected.
在这里插入图片描述

open try

On the Alibaba Cloud Function Compute (FC) function details page, click call log to query the call record of the current function. Search tab through the keyword to view the content of the function call log.
Documentation link:
https://help.aliyun.com/document_detail/73349.html

在这里插入图片描述

Alibaba Cloud Function Compute (FC) not only focuses on providing users with extremely high engineering efficiency and helping users reduce costs and improve efficiency, but also care about whether users experience smoothness when using our products.

With the increase in business volume, users have more and more requests for logs. The combination of the request list and keyword query in the Function Compute console can easily cover 100% of the log requirements from developers, allowing you to locate problems more quickly. , to directly retrieve business logs.


阿里云云原生
1k 声望302 粉丝