How to track call relationships in MSA and display log information accordingly

The method tracks and displays log information based on call relationships using transaction IDs, addressing the challenge of identifying problem steps in microservices architectures by clarifying application interactions.

JP7573248B2Active Publication Date: 2024-10-25OPENMARU INC
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
JP2023034859
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-09-16
Filing Date
2023-03-07
Publication Date
2024-10-25
Estimated Expiration
2043-03-07

AI Technical Summary

Technical Problem

In microservices architecture, identifying the step where a problem occurs during service execution is challenging due to unclear call relationships among multiple applications, requiring extensive manual analysis of separate log information stored across applications.

Method used

A method to track and display log information based on call relationships by using a server with log collection agents and a log collection server, issuing transaction IDs to identify and display log information of multiple applications based on their interactions.

Benefits of technology

Facilitates easy identification of problematic log information and the service step where issues arise, reducing the time and effort required to diagnose problems in microservices architectures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007573248000001
    Figure 0007573248000001
  • Figure 0007573248000002
    Figure 0007573248000002
  • Figure 0007573248000003
    Figure 0007573248000003
Patent Text Reader

Abstract

To provide a method for tracing a call relationship in an MSA and displaying log information accordingly.SOLUTION: The present invention relates to a method configured to easily recognize at which step of service a problem has occurred when a problem occurs during a process of providing the entire service by multiple applications in a microservice architecture.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a method for tracking call relationships between multiple applications in a microservices architecture and displaying log information based on such call relationships, and more particularly, to a method for tracking call relationships between multiple applications that execute services so as to easily determine at which step of a service a problem has occurred when a problem occurs during a process in which an entire service is provided by multiple applications in a microservices architecture, and to display log information of applications based on such call relationships so as to be easily recognized. [Background technology]

[0002] Microservices architecture (MSA) refers to an architecture that divides a large application or computer service into multiple applications that each handle a specialized function while being built on a server. In microservices architecture, since the entire service is composed by modifying and combining multiple applications, it is freer to add, remove, or improve functions compared to the conventional monolithic architecture.

[0003] According to conventional technology, the multiple applications that make up a microservices architecture are executed individually, separated by function, and the log information of the applications executed in this way is stored in separate memory spaces.

[0004] Problems may occur during the process of providing an overall service due to the execution of multiple applications.

[0005] For example, when a customer with a certain membership orders a product at an online shopping mall, a problem may occur in which the calculated price is different from the price expected at the time of ordering. In such a case, the problem can be solved by checking whether the problem is in the service step of verifying the membership, the service step of authenticating the price of the ordered product, the service step of calculating the price, or another service step.

[0006] The entire service is provided by executing multiple applications, that is, an application that provides one service is executed, and in order to provide the next step service, another application that provides the next step service is called and executed in response to an API call in the application, thereby providing the entire service.

[0007] In such a situation, information regarding the calling relationships between multiple applications during the process of providing the entire service is not clear, and the service is provided based on separately stored log information of each application, resulting in the inconvenience of having to analyze in detail each piece of generated log information.

[0008] In other words, in a situation where the calling relationship between applications based on API calls is unclear, it is necessary to track and analyze the log information of each of the many applications that are stored in a distributed manner in order to determine at which step of the service a problem occurred. However, analyzing the entire log information of each of the many applications that provide an entire service requires a lot of time and manpower, and there is a certain degree of limitation in finding the above-mentioned problems by analyzing the entire log information.

[0009] Furthermore, even if the entire log information resulting from the execution of multiple applications is displayed within a certain time range, it is unclear which log information is related to a calling relationship with other log information. Therefore, even if the log information is analyzed and a problem is identified, the log information is displayed without knowing which calling relationship the log information is related to. Therefore, it is unclear whether the identified problem is the problem that was originally intended to be identified.

[0010] Therefore, there is an urgent need for research into technical features that can easily identify at which step of a service a problem occurred while multiple applications are being executed to provide an entire service. [Prior art documents] [Patent documents]

[0011] [Patent Document 1] Korean Patent No. 10-2337962 Summary of the Invention [Problem to be solved by the invention]

[0012] In order to solve the problems of the conventional technology described above, an object of the present invention is to provide a method for easily grasping in which step of a service a problem occurred while multiple applications are being executed when an entire service is being provided. [Means for solving the problem]

[0013] A method for solving the above-mentioned problems of the prior art is a method for tracking a call relationship between a plurality of applications in a server in which a microservice architecture composed of the plurality of applications is constructed, and displaying log information related to the call relationship, the method including: (a) a step of calling a first application among the plurality of applications; (b) a step of collecting log information of the first application by a first log collection agent installed in the first application; (c) a step of calling a second application among the plurality of applications by an API (Application Programming Interface) call in the first application; (d) a step of collecting log information of the second application by a second log collection agent installed in the second application; and (e) a step of transferring the log information of the first application collected in the step (b) and the log information of the second application collected in the step (d) to a log collection server, and displaying the transferred log information of the first application and the transferred log information of the second application on a display unit of the log collection server, In step (e), log information of the first application and log information of the second application based on the calling relationship between the first application and the second application through the API call in step (c) may be displayed so as to be identified.

[0014] Preferably, in the step (b), a first transaction ID is issued by the first log collection agent by invoking the first application; In step (c), an API including information about the first transaction ID issued in step (b) is called, and the second log collection agent can receive the information about the first transaction ID.

[0015] Preferably, in step (d), the log information of the second application collected may include log information identified by the first transaction ID as information regarding the log made by the API call in step (c).

[0016] Preferably, in the step (e), log information of the first application and log information of the second application identified by the first transaction ID together with the first transaction ID can be transferred to the log collection server.

[0017] Preferably, the display unit displays a topology of the plurality of applications, and in this case, a topology of a calling relationship between the first application and the second application identified by the first transaction ID is displayed as a topology in which the first application and the second application are connected to each other, and The display unit displays log information of the multiple applications, and in this case, the log information of the first application and the log information of the second application according to a calling relationship between the first application and the second application identified by the first transaction ID can be displayed so as to be identified in the log information of the multiple applications. Effect of the Invention

[0018] By the means for solving the above problems, when an entire service is provided, the calling relationships between multiple applications can be tracked, and further, log information based on such calling relationships can be displayed so as to be identified from the entire log information, thereby making it possible to grasp problematic log information, identify the calling relationship in which the problematic log information was generated, and easily grasp at which service step a problem occurred. [Brief description of the drawings]

[0019] [Figure 1] FIG. 1 is a conceptual diagram illustrating a microservices architecture according to the present invention. [Figure 2a] FIG. 1 is a conceptual diagram illustrating a microservices architecture according to the present invention. [Figure 2b] FIG. 1 is a conceptual diagram illustrating a microservices architecture according to the present invention. [Diagram 3] 1 is a diagram illustrating the contents of a log message transferred from a log collection agent to a log collection server. FIG. [Figure 4] FIG. 2 is a schematic diagram illustrating how calling relationships are tracked according to the present invention; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0020] Hereinafter, preferred embodiments of the method according to the present invention will be described with reference to the accompanying drawings. In this process, the thickness of lines and the size of components shown in the drawings may be exaggerated for clarity and convenience of explanation. In addition, the terms described below are defined in consideration of the functions of the present invention, and may vary depending on the intention or practice of a user or operator. Therefore, the definitions of such terms should be determined based on the overall contents of this specification.

[0021] With reference to Figures 1 to 3, an apparatus for executing a method for tracking call relationships between multiple applications and displaying log information related to such call relationships in a server on which a microservice architecture consisting of multiple applications is built will be described.

[0022] A microservices architecture consists of multiple applications running together to provide an overall service.

[0023] The microservice architecture according to the present invention may include a number of applications, log collection agents installed in each application, and a log collection server to which application log information collected by the log collection agents is transferred via a network.

[0024] Each log collection agent can include a transaction ID issuing unit, an application log information collecting unit, an API calling unit, a log information transferring unit, and a parent transaction ID receiving unit.

[0025] The transaction ID issuing unit can issue a unique transaction ID when an application in which a log collection agent is installed is called. Therefore, when an application is called in response to a user call or an API call of another application, the transaction ID issuing unit can issue a unique transaction ID for that call.

[0026] The application log information collection unit can collect information such as the application log, the unique transaction ID issued by the transaction ID issue unit, server IP, instance ID, client IP, logged-in user ID, session ID, etc., and the collected information can be transferred to the log collection server via the log information transfer unit. In the case of the Java language, the Java Agent Services (JSR 87) technology can be used so that the agent can collect information such as logs, server IP, instance ID, logged-in user ID, etc., left by the Logging Framework used in the application without modifying the application.

[0027] The API call unit makes a call to the application for which the next step service is provided, and the API call can be made with the unique transaction ID issued by the transaction ID issuer of the currently running application automatically added to the message header by the agent without any application changes.

[0028] The parent transaction ID receiving unit receives a unique transaction ID of an application providing a service of the previous step, and the application log information collecting unit can collect log information of the application in a state where the unique transaction ID is received as a parent transaction ID. That is, when an application is called, log information can be collected in a state where the unique transaction ID issued by the transaction ID issuing unit and the parent transaction ID received by the API call are set.

[0029] For example, when a second application is called in response to an API call from a first application, a first transaction ID issued by a transaction ID issuing unit of a first log collection agent installed in the first application is received by a parent transaction ID receiving unit of a second log collection agent of the second application. At this time, the second log collection agent issues a second transaction ID in response to the call, and further, collection of log information can be performed in a state where the first transaction ID is set as the parent transaction ID.

[0030] When the third application is called again in response to an API call from the second application, the second transaction ID issued by the transaction ID issuing unit of the second log collection agent installed in the second application is received by the parent transaction ID receiving unit of the third log collection agent of the third application. At this time, the third log collection agent similarly issues a third transaction ID in response to the call, and further, collection of log information can be performed with the second transaction ID set as the parent transaction ID.

[0031] In this manner, the calling relationship between the first application and the second application, the calling relationship between the second application and the third application, and the calling relationship among the first application, the second application, and the third application can be grasped.

[0032] The log information transfer unit transfers the collected log information to a log collection server. When the log information is transferred to the log collection server, information such as that shown in Fig. 3 can be added to a message header so that the log information can be identified based on the call relationship, server IP, or client ID.

[0033] The log collection server may include a log information receiving / recording unit, a display unit, and a log information storage unit.

[0034] The log information receiving / recording unit receives the log information collected by the log collection agent of each application, and records and stores the log information in the log information storage unit.

[0035] The display unit displays the log information stored in the log information storage unit in various forms desired by the user.

[0036] As shown in Fig. 4, which illustrates an example of a display method, the display unit displays a topology of multiple applications, and at this time, a topology in which multiple applications in a calling relationship are connected to each other can be displayed. That is, a calling relationship topology in which the Bill application is called by an API call from the Front application, and the Support application and the Customer application are called by the API call from the Bill application can be displayed. In addition, a calling relationship topology from the Front application to the User application and from the User application to the ERP application can be displayed.

[0037] Such a call relationship topology may be formed by tracking the connection relationship of the transaction IDs of each of such applications, in which the transaction ID issued by the log collection agent of the calling application is received by the called application and set as a parent transaction ID, and the log collection agent of the called application further issues its own transaction ID, and the next called application receives the transaction ID of the previously called application and sets it as a parent transaction ID, and the log collection agent of the called application also issues its own transaction ID.

[0038] Furthermore, the transaction ID of each application is transmitted to the log collection server along with log information of each application, such as call logs and execution logs, so that when an application is clicked in the call relationship topology, log information according to the call relationship of the application can be displayed on the display unit.

[0039] In yet another example of a display method, log information generated in all services provided by execution of multiple applications can be displayed in real time. Of the log information generated in all services, only the log information corresponding to a specific server IP or client ID can be displayed, and further, a specific call relationship can be identified by using an indent or a color tone. Alternatively, it goes without saying that only a specific call relationship can be identified and only the log information according to the specific call relationship can be displayed.

[0040] As an example of yet another display method, when log information generated by the entire service is displayed in chronological order, log information of applications that are called at the same time is displayed together, making it difficult to distinguish the log information. Therefore, in order to make it easier to distinguish, the log information generated by the entire service can be grouped and displayed by each application.

[0041] Furthermore, it goes without saying that the messages can be grouped and displayed according to the calling relationship identified by the transaction ID.

[0042] The call relationships identified by such transaction IDs and the log information according to the call relationships can be easily classified in various display methods, so that it is easy to know at which step of the service a problem occurred.

[0043] This article explains how to track call relationships between multiple applications in a microservices architecture and display log information based on such call relationships.

[0044] 1. The step where the first application among many applications is called When multiple applications are executed to provide an entire service, one application may call another application through an API (Application Programming Interface) call while the other application is running, and yet another application may be called through an API call while the other application is running, so that multiple calling relationships can be established between the multiple applications.

[0045] With such multiple calling relationships, a first application of the multiple applications can be called.

[0046] It goes without saying that the first application may be a user interface called by a user, or it may not be a user interface but an application that provides one of the overall services through an API call of the user interface, or it may be an application that provides another service through an API call of an application that provides one of the overall services.

[0047] This allows a second application, which will be described later, to be an application that is generated by calling the API of the first application.

[0048] 2. Steps for collecting log information from the first application and issuing the first transaction ID When the first application is called, a transaction ID issuing unit of a first log collection agent of the first application issues a first transaction ID, and a log information collecting unit of the first log collection agent collects log information such as a call log and an execution log. The collected log information may include log information identified by the first transaction ID as information related to the call log, the execution log, and the like.

[0049] 3. Step where the second application is called by the API call of the first application The called first application is executed, and an API call is made to provide the next step service, and such an API call calls a second application.

[0050] Here, an API call is made with information about the first transaction ID issued by the transaction ID issuer of the first log collection agent of the first application included in the message header, and as a result, the parent transaction ID receiver of the second log collection agent of the called second application receives the first transaction ID and sets it as the parent transaction ID. It goes without saying that the second transaction ID is issued by the transaction ID issuer of the second log collection agent when the second application is called.

[0051] 4. Step where log information of the second application is collected A log information collector of a second log collection agent of a second application collects log information. Here, the log information may include information on logs generated by an API call, and more specifically, may include log information identified by a first transaction ID and a second transaction ID, which are parent transaction IDs received and set by the API call.

[0052] 5. The transaction ID and the log information are transferred to the log collection server, and the transferred log information is displayed. The log information of the first application collected by the log information collection unit of the first log collection agent and the log information of the second application collected by the log information collection unit of the second log collection agent are transferred to a log collection server, and the transferred log information of the first application and the log information of the second application can be displayed on a display unit of the log collection server.

[0053] When the log information is transferred to the log collection server, the log information of the first application identified by the first transaction ID and the log information of the second application may be transferred together with the first transaction ID, so that the call relationship may be tracked in the log collection server, and the log information according to the tracked call relationship may be displayed in an identified state.

[0054] The display unit displays the log information stored in the log information storage unit, and as described above, the log information can be displayed in various forms desired by the user.

[0055] The present specification has been described with reference to the embodiments shown in the drawings so that those skilled in the art can easily understand and reproduce the present invention, but this is merely an example, and those skilled in the art can understand that various modifications and equivalent other embodiments are possible from the embodiments of the present invention. Therefore, the scope of protection of the present invention should be determined by the claims.

Claims

1. A method for tracking a call relationship between a plurality of applications and displaying log information regarding the call relationship in a server in which a microservice architecture composed of the plurality of applications is constructed, comprising: (a) invoking a first application of the multiple applications; (b) collecting log information of the first application by a first log collection agent installed in the first application; (c) invoking a second application among the multiple applications by an API (Application Programming Interface) invocation by the first log collection agent; (d) collecting log information of the second application by a second log collection agent installed in the second application; (e) transmitting the log information of the first application collected in the step (b) and the log information of the second application collected in the step (d) to a log collection server, and displaying the transferred log information of the first application and the transferred log information of the second application on a display unit of the log collection server; the first log collection agent includes a first transaction ID issuing unit, a first API calling unit, a first application log information collecting unit, a first log information transferring unit, and a first parent transaction ID receiving unit; the second log collection agent includes a second transaction ID issuing unit, a second API calling unit, a second application log information collecting unit, a second log information transferring unit, and a second parent transaction ID receiving unit; In the step (b), the first application is called, and a unique first transaction ID is issued by the first transaction ID issuing unit, and the issued first transaction ID is collected by the first application log information collecting unit; In the step (c), a call is made to the second application by the first API call unit of the first log collection agent, and at this time, the call to the second application is made in a state in which the first transaction ID issued by a first transaction ID issue unit is added to a message header; In the step (d), the second application is called, and the second parent transaction ID receiving unit receives the first transaction ID, and in a state in which the first transaction ID is set as a parent transaction ID, the second transaction ID issuing unit issues a unique second transaction ID, and the first transaction ID set as the parent transaction ID and the issued second transaction ID are collected in the second application log information collecting unit; In the step (e), the first transaction ID collected by the first application log information collection unit is transferred to the log collection server via the first log information transfer unit, and the first transaction ID and the second transaction ID set as the parent transaction ID collected by the second application log information collection unit are transferred to the log collection server via the second log information transfer unit, In step (e), the display unit displays log information of the multiple applications, and in this case, a call relationship between the first application and the second application is tracked based on the first transaction ID transferred to the log collection server via the first log information transfer unit, and the first transaction ID and the second transaction ID set as the parent transaction ID transferred to the log collection server via the second log information transfer unit, and the log information of the first application and the log information of the second application according to the call relationship between the first application and the second application identified by the first transaction ID are displayed to be identified in the log information of the multiple applications.

2. The method of claim 1, wherein the display unit displays a topology of the multiple applications, and in this case, a topology of a calling relationship between the first application and the second application identified by the first transaction ID is displayed as a topology in which the first application and the second application are connected to each other.

Citation Information

Patent Citations

  • Business-oriented operation and maintenance analysis method and device, equipment and medium

    CN111611132A

  • Trace processing program, method, and device

    JP2005346414A

  • System and method for executing application based on microservice architecture and computer program for the same

    KR102337962B1

  • Generating metrics values for teams of microservices of a microservices-based architecture

    US11347622B1

  • Method and apparatus for real-time intelligent workload reporting in a heterogeneous environment

    US20040220947A1