CN112131070A - Call relation tracking method, device, equipment and computer readable storage medium - Google Patents

Call relation tracking method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112131070A
CN112131070A CN201910557465.XA CN201910557465A CN112131070A CN 112131070 A CN112131070 A CN 112131070A CN 201910557465 A CN201910557465 A CN 201910557465A CN 112131070 A CN112131070 A CN 112131070A
Authority
CN
China
Prior art keywords
call relation
log
relation log
calling
call
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910557465.XA
Other languages
Chinese (zh)
Inventor
张晋军
李旻
刘海锋
何小锋
李晓伟
陈源
单华松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910557465.XA priority Critical patent/CN112131070A/en
Publication of CN112131070A publication Critical patent/CN112131070A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/875Monitoring of systems including the internet

Abstract

The invention provides a calling relation tracking method, a calling relation tracking device, calling relation tracking equipment and a computer readable storage medium, wherein the method comprises the following steps: receiving a call relation tracking request; acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application; setting a calling relation log identifier for the calling relation log according to a preset naming rule; and forwarding the call relation log and the call relation log identification to a preset data server for storage. Therefore, the multi-application calling relation in the distributed system can be obtained, and in addition, the modification of upper layer codes is not needed.

Description

Call relation tracking method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a call relation tracking method, device, and apparatus, and a computer-readable storage medium.
Background
The distributed tracking system is generally used for tracking complex calling relations among modules of the distributed system, and can help developers to better comb the calling and dependency relations among the modules, better position system bottlenecks and carry out system optimization in a targeted manner. And the system can also help developers to more accurately locate problems and carry out root cause analysis.
The existing distributed tracking system generally builds a call relation into a tracking tree, and stores the collected tracking tree into the distributed storage system, so that a subsequent user can acquire the tracking tree from the distributed storage system to realize query on the running state of the distributed system. To increase the availability of the systems, these systems bury points in some commonly used libraries at the lower level to achieve transparency to upper level applications.
However, as micro-service architecture based applications, such as large-scale internet e-commerce services, become more complex, the corresponding operation and maintenance tools, particularly call relation tracking systems, have become unable to meet the requirements. Specifically, when the number of micro services related to the application increases dramatically, the call relations between the services are complex and diverse, wherein the application also concerns the call relations among cross-application, cross-micro-service and cross-data center based on the services besides the call relations among the traditional services, and the adoption of the distributed tracking system cannot realize the collection of the call relations among cross-application, cross-micro-service and cross-data center; in addition, when the above distributed tracking system is used to track the call relationship, the application code at the upper layer needs to be changed, for example, a specific code is inserted, which increases the burden of the application developer.
Disclosure of Invention
The invention provides a call relation tracking method, a call relation tracking device, call relation tracking equipment and a computer readable storage medium, which are used for solving the technical problem that the existing call relation tracking method cannot realize the tracking of call relations among cross-applications.
The first aspect of the invention provides a call relation tracking method, which comprises the following steps:
receiving a call relation tracking request;
acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
setting a calling relation log identifier for the calling relation log according to a preset naming rule;
and forwarding the call relation log and the call relation log identification to a preset data server for storage.
Another aspect of the present invention provides a call relation tracking apparatus, including:
the receiving module is used for receiving a calling relation tracking request;
the acquisition module is used for acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
the identification module is used for setting calling relation log identification for the calling relation log according to a preset naming rule;
and the sending module is used for forwarding the call relation log and the call relation log identifier to a preset data server for storage.
Still another aspect of the present invention is to provide a call relation tracking apparatus, including: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the call relation tracking method as described above by the processor.
Yet another aspect of the present invention is to provide a computer-readable storage medium having stored therein computer-executable instructions for implementing the call relation tracking method as described above when executed by a processor.
The calling relationship tracking method, the calling relationship tracking device, the calling relationship tracking equipment and the computer readable storage medium provided by the invention receive a calling relationship tracking request; acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application; setting a calling relation log identifier for the calling relation log according to a preset naming rule; and forwarding the call relation log and the call relation log identification to a preset data server for storage. Therefore, the multi-application calling relation in the distributed system can be obtained, and in addition, the modification of upper layer codes is not needed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram of a network architecture on which the present invention is based;
fig. 2 is a schematic flowchart of a call relation tracking method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating call relation tracking in practical applications;
fig. 4 is a schematic flowchart of a call relation tracking method according to a second embodiment of the present invention;
fig. 5 is a schematic flowchart of a call relation tracking method according to a third embodiment of the present invention;
fig. 6 is a schematic flowchart of a call relation tracking method according to a fourth embodiment of the present invention;
fig. 7 is a schematic flowchart of a call relation tracking method according to a fifth embodiment of the present invention;
fig. 8 is a schematic structural diagram of a call relation tracking apparatus according to a sixth embodiment of the present invention;
fig. 9 is a schematic structural diagram of a call relation tracking device according to a seventh embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other examples obtained based on the examples in the present invention are within the scope of the present invention.
The existing distributed tracking system generally builds a call relation into a tracking tree, and stores the collected tracking tree into the distributed storage system, so that a subsequent user can acquire the tracking tree from the distributed storage system to realize query on the running state of the distributed system. To increase the availability of the systems, these systems bury points in some commonly used libraries at the lower level to achieve transparency to upper level applications. However, as micro-service architecture based applications, such as large-scale internet e-commerce services, become more complex, the corresponding operation and maintenance tools, particularly call relation tracking systems, have become unable to meet the requirements. Specifically, when the number of micro services related to the application increases dramatically, the call relations between the services are complex and diverse, wherein the application also concerns the call relations among cross-application, cross-micro-service and cross-data center based on the services besides the call relations among the traditional services, and the adoption of the distributed tracking system cannot realize the collection of the call relations among cross-application, cross-micro-service and cross-data center; in addition, when the above distributed tracking system is used to track the call relationship, the application code at the upper layer needs to be changed, for example, a specific code is inserted, which increases the burden of the application developer. In order to solve the technical problem, the invention provides a call relation tracking method, a call relation tracking device, call relation tracking equipment and a computer-readable storage medium.
It should be noted that the call relation tracking method, device, apparatus, and computer-readable storage medium provided in the present application can be applied to any tracking of call relations between applications.
Fig. 1 is a schematic diagram of a network architecture based on the present invention, and as shown in fig. 1, the network architecture based on the present invention at least includes: the call relation tracking apparatus 1, the distributed system 2, and the data server 3. The call relation tracking device 1 is in communication connection with the distributed system 2 and the data server 3, respectively, so that information interaction with the distributed system 2 and the data server 3 can be performed. The calling relation tracking device 1 can be written by C/C + +, Java, Shell or Python languages and the like; the data server 3 may be a cloud server or a server cluster, and a large amount of data is stored therein.
Fig. 2 is a schematic flowchart of a call relation tracking method according to an embodiment of the present invention; fig. 3 is a schematic diagram of call relation tracking in practical application, as shown in fig. 1, the method includes:
step 101, receiving a call relation tracking request;
102, acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
103, setting a calling relation log identifier for the calling relation log according to a preset naming rule;
and 104, forwarding the call relation log and the call relation log identification to a preset data server for storage.
The execution subject of the present embodiment is a call relation tracking apparatus. The call relation tracking refers to the tracking of call relation among cross-application and cross-micro-service based on service. For example, in an e-commerce system, a complete process of generating and processing a customer order includes several applications and interactions therebetween. The customer operates the shopping cart to submit the order form by browsing the commodity, pays by the connected financial account, and finally completes the processing of the order form by the stock, delivery and sending of the commodity by the logistics system, therefore, the acquisition of the calling relationship in the distributed system can be realized by adopting a point-burying mode. Specifically, each application in the distributed system has a plurality of micro services, so that points can be buried in each micro service in advance to track the call relationship of each service. Further, since there are many micro services in the application, and embedding points for each micro service often causes a problem of a large data volume, in order to reduce the data volume on the basis of obtaining the call relationship of the distributed system, the use frequency of each micro service may be determined, and the micro service of which the use frequency exceeds a preset frequency threshold is used as a middleware, and the points are embedded in the middleware to obtain the call relationship in the distributed system. For example, the middleware whose usage frequency exceeds the preset frequency threshold includes, but is not limited to, a message queue microservice, a data cache microservice, and a settlement service microservice. In practical application, the burial point and the summarization and recording of the acquired data can be realized through a core package comprising codes. Specifically, a call relation tracking request may be received, and a call relation log of each application may be acquired through a middleware embedded point preset in each application according to the call relation tracking request, where the middleware is a micro service whose usage frequency exceeds a preset frequency threshold in each application. Further, since the call relation log obtained through the middleware embedded point in each application is a log of call relations among a plurality of applications, in order to identify each call relation log, a call relation log identifier may be set for the call relation log according to a preset naming rule. And storing the call relation log and the corresponding call relation log identification into a preset data server in an associated manner so as to obtain the call relation log from the data server for viewing and analyzing.
It should be noted that, unlike the existing call relation tracking system that performs point burying in the code library, the present invention performs point burying in the existing micro service in each application, thereby avoiding waste of manpower and material resources caused by modifying the upper code, and improving the efficiency of call relation tracking.
For example, as shown in fig. 3, fig. 3 includes a front-end application, a back-end application 1, a back-end application 2, and a data server, where the front-end application starts link tracking by sending a call relation tracking request to the back-end application 1, and after receiving a response from the back-end application 1, the front-end application sends a second request to the back-end application 2 to trigger two storage data accesses of the back-end application 2. And finally, the front-end application responds to the user after receiving the result, and the system automatically ends the link tracking. The dotted line part is a call relation log obtained by the middleware.
In the call relation tracking method provided by the embodiment, a call relation tracking request is received; acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application; setting a calling relation log identifier for the calling relation log according to a preset naming rule; and forwarding the call relation log and the call relation log identification to a preset data server for storage. Therefore, the multi-application calling relation in the distributed system can be obtained, and in addition, the modification of upper layer codes is not needed.
Further, on the basis of any of the above embodiments, the method comprises:
receiving a call relation tracking request;
acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
setting a single-byte global unique identifier for the call relation log according to a preset naming rule;
and forwarding the call relation log and the call relation log identification to a preset data server for storage.
In this embodiment, in order to support a large-scale microservice system with a greatly increased number, a single-byte globally unique identifier may be set for the call relation log according to a preset explicit rule, and the single-byte globally unique identifier may be used as the call relation log identifier. It can be understood that, unlike the conventional four-byte unique identifier, the bandwidth occupied by the unique identifier can be effectively shortened by using a single-byte unique identifier, and thus the amount of information transmitted in a unit bandwidth can be increased.
According to the call relation tracking method provided by the embodiment, the single-byte global unique identifier is set for the call relation log according to the preset naming rule, so that the bandwidth occupied by the unique identifier can be effectively shortened on the basis of acquiring the multi-application call relation in the distributed system, and the transmitted information amount in the unit bandwidth can be further improved.
Further, on the basis of any of the above embodiments, the application has an application identifier, and the microservice has a microservice identifier; accordingly, the method comprises:
receiving a call relation tracking request;
acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
setting a calling relation log identifier for the calling relation log according to the application identifier, the micro-service identifier and the calling sequence of each micro-service;
and forwarding the call relation log and the call relation log identification to a preset data server for storage.
In this embodiment, each application has an application identifier, and accordingly each microservice also has a microservice identifier, so that in order to better represent the call relationship of the call relationship log, the call relationship log identifier may be set for the call relationship log according to the application identifier, the microservice identifier, and the call sequence of each microservice.
According to the call relation tracking method provided by the embodiment, the call relation log identifier is set for the call relation log according to the application identifier, the micro-service identifier and the call sequence of each micro-service, so that the call relation of the call relation log can be better represented.
Fig. 4 is a schematic flow chart of a call relation tracking method according to a second embodiment of the present invention, where on the basis of any of the above embodiments, the method includes:
step 201, receiving a call relation tracking request;
step 202, obtaining a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
step 203, setting a calling relation log identifier for the calling relation log according to a preset naming rule;
step 204, caching the call relation log and the call relation log identification through a ring cache structure;
and step 205, forwarding the call relation log and the call relation log identifier to a preset data server for storage.
In this embodiment, in order to support a large-scale microservice system with a greatly increased number, before forwarding a call relation log to a data server, the call relation log and the call relation log identifier may be cached through a ring cache structure. The annular cache structure has the advantages that the memory consumption is low, all the collected and forwarded messages are processed in the memory, a disk does not fall, the message processing speed is high, and therefore the obtaining efficiency of the call relation log can be improved. It should be noted that, in the process of caching the call relation logs by using the ring cache structure, when the ring queue overflows, the system randomly discards normal call relation logs to ensure the throughput rate. This is allowed in the system because links are typically called thousands of times, and random dropping is comparable to the random sampling strategy employed by conventional tracking systems.
According to the call relation tracking method provided by the embodiment, the call relation log and the call relation log identification are cached through the annular cache structure, so that the obtaining efficiency of the call relation log can be improved.
Further, on the basis of any of the above embodiments, the method comprises:
receiving a call relation tracking request;
acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
setting a calling relation log identifier for the calling relation log according to a preset naming rule;
compressing the call relation log and the call relation log identification;
and forwarding the compressed call relation log and the call relation log identification to a preset data server for storage.
In this embodiment, in order to support a large-scale micro-service system with a greatly increased number, before forwarding the call relation log to the data server, the call relation log may be compressed, and the compressed call relation log and the call relation log identifier may be sent to a preset data server together for storage. It can be understood that the call relation log is compressed and then transmitted, so that the bandwidth occupied by the call relation log can be effectively reduced, and the amount of transmitted information in unit bandwidth can be further increased.
In the call relation tracking method provided by this embodiment, the call relation log and the call relation log identifier are compressed; and forwarding the compressed call relation log and the call relation log identifier to a preset data server for storage, so that the transmitted information amount in unit bandwidth can be increased, and the transmission speed of the call relation log can be increased.
Further, on the basis of any of the above embodiments, the method comprises:
receiving a call relation tracking request;
acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
setting a calling relation log identifier for the calling relation log according to a preset naming rule;
compressing the call relation log and the call relation log identification;
dynamically sampling the call relation log and the call relation log identification;
and forwarding the sampled call relation log and the call relation log identifier to a preset data server for storage.
In this embodiment, in order to support a large-scale micro-service system with a greatly increased number, before forwarding the call relationship log to the data server, the call relationship log may be dynamically sampled, and the sampled call relationship log and the call relationship log identifier may be forwarded to a preset data server for storage. It can be understood that after the call relation log is dynamically sampled, the bandwidth occupied by the call relation log can be effectively reduced, and the amount of transmitted information in unit bandwidth can be further increased.
In the method for tracking a call relation provided by this embodiment, the call relation log and the call relation log identifier are dynamically sampled; and forwarding the sampled call relation log and the call relation log identifier to a preset data server for storage, so that the transmitted information amount in unit bandwidth can be increased, and the transmission speed of the call relation log can be increased.
As an implementable manner, data can be collected through a long chain of a single Transmission Control Protocol (TCP), so that overhead required for establishing the TCP can be saved, and the utilization rate of the bandwidth is further improved. In addition, tracking of large-scale call relation logs can be supported through the multi-instance cluster.
Fig. 5 is a schematic flow chart of a call relation tracking method according to a third embodiment of the present invention, where on the basis of any one of the above embodiments, as shown in fig. 5, the method includes:
step 301, receiving a call relation tracking request;
step 302, obtaining a call relation log of each application through a middleware embedded point preset in each application according to the call relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
step 303, setting a calling relation log identifier for the calling relation log according to a preset naming rule;
step 304, forwarding the call relation log with the acquisition time not exceeding a preset first time threshold and the call relation log identification to a preset real-time data server for storage;
and 305, forwarding the call relation log with the acquisition time exceeding a preset first time threshold and the call relation log identification to a preset offline data server for storage.
In this embodiment, after the call relation log is acquired, the call relation log may be forwarded to the data server for storage. Specifically, the data server may be divided into a real-time data server and an offline data server, where the real-time data server is configured to store a call relation log whose acquisition time does not exceed a preset first time threshold, and the offline data server is configured to store a call relation log whose acquisition time exceeds the preset first time threshold. Therefore, after the call relation log is acquired, the call relation log of which the acquisition time does not exceed the preset first time threshold can be sent to the real-time data server for storage, so that a user can check the call relation log within the first time threshold. And sending the call relation log with the acquisition time exceeding a preset first time threshold value to an offline data server for storage.
In the call relation tracking method provided by this embodiment, the call relation log whose collection time does not exceed the preset first time threshold and the call relation log identifier are forwarded to the preset real-time data server for storage, and the call relation log whose collection time exceeds the preset first time threshold and the call relation log identifier are forwarded to the preset offline data server for storage, so that a user can view the collected call relation log in time on the basis of realizing call relation tracking of the distributed system.
Fig. 6 is a schematic flow chart of a call relation tracking method according to a fourth embodiment of the present invention, where on the basis of any of the foregoing embodiments, as shown in fig. 6, the method includes:
step 401, receiving a call relation tracking request;
step 402, obtaining a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
step 403, setting a calling relation log identifier for the calling relation log according to a preset naming rule;
step 404, forwarding the call relation log and the call relation log identifier to a preset data server for storage;
step 405, receiving a log analysis instruction;
step 406, obtaining a call relation log from the preset data server according to the log analysis instruction;
step 407, analyzing the call relation log, and judging whether the distributed database fails.
In this embodiment, after the call relation log is obtained by tracking, the call relation log may also be analyzed, so that whether a failure occurs in the distributed database at present can be determined. Specifically, a log analysis instruction may be received, a call relation log may be obtained from a preset data server according to the log analysis instruction, and the call relation log may be analyzed. The log analysis instruction may include a call relation log identifier, call relation log obtaining time information, and the like, so as to achieve accurate obtaining of the call relation log.
In the call relation tracking method provided by this embodiment, a log analysis instruction is received, a call relation log is obtained from the preset data server according to the log analysis instruction, the call relation log is analyzed, and whether a failure occurs in the distributed database is determined. Therefore, whether the distributed system fails or not can be determined on the basis of tracking the call relation of the distributed system.
Further, on the basis of any of the above embodiments, the method comprises:
receiving a call relation tracking request;
acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
setting a calling relation log identifier for the calling relation log according to a preset naming rule;
forwarding the call relation log and the call relation log identification to a preset data server for storage;
receiving a log analysis instruction;
acquiring a call relation log from the preset data server according to the log analysis instruction;
judging whether a link with calling time exceeding a preset second time threshold exists in the calling relation log or not; and/or the presence of a gas in the gas,
calculating the calling times of each application and/or micro service in the calling relation log, and determining the importance degree of each application and/or micro service according to the calling times of each application and/or micro service; and/or the presence of a gas in the gas,
calculating the time-consuming information of each link in the call relation log; and/or the presence of a gas in the gas,
calculating time-consuming information of each link in the call relation log, and comparing the time-consuming information with preset standard time-consuming information; and/or the presence of a gas in the gas,
counting the calling relation of each application and/or micro service in the calling relation log; and/or the presence of a gas in the gas,
counting the calling relation of each application and/or micro-service in the calling relation log, and performing bottleneck analysis on the calling relation log according to the calling relation;
and judging whether the distributed database fails.
In this embodiment, the analysis of the call relation log may be implemented in various ways. Specifically, it may be determined whether a link whose invocation time exceeds a preset second time threshold exists in the invocation relationship log, and if so, it may be determined that the link fails, where the second time threshold may be the invocation time when the link operates normally. The number of times of the calls of each application and/or micro service can be calculated, so that the importance degree of each application and/or micro service can be determined according to the number of times of the calls of each application and/or micro service. It can be understood that if a micro service is called for a large number of times, the importance of the micro service is high, and when the micro service fails, a large problem may be caused, and therefore, bottleneck analysis may also be performed according to the number of times that each application and/or micro service is called, so that the distributed system can be repaired quickly when the distributed system fails. And calculating time-consuming information of each link in the call relation log, wherein the time-consuming information of each link can intuitively display whether the current system fails, if the time-consuming information exceeds preset standard time-consuming information, the current system can be determined to fail, otherwise, the normal operation of the system can be determined. In addition, the calling relationship of each application and/or micro service in the calling relationship log can be counted, so that bottleneck analysis can be performed according to the calling relationship of each application and/or micro service, and the distributed system can be quickly repaired when the distributed system fails. It should be noted that, the analysis of the call relation log may be implemented alone or in combination, and the present invention is not limited herein.
In the call relation tracking method provided by this embodiment, whether a link whose call time exceeds a preset second time threshold exists in the call relation log is determined; and/or calculating the calling times of each application and/or micro service in the calling relation log, and determining the importance degree of each application and/or micro service according to the calling times of each application and/or micro service; and/or calculating time-consuming information of each link in the call relation log; and/or calculating time-consuming information of each link in the call relation log, and comparing the time-consuming information with preset standard time-consuming information; and/or counting the calling relationship of each application and/or microservice in the calling relationship log; and/or counting the call relation of each application and/or micro service in the call relation log, and performing bottleneck analysis on the call relation log according to the call relation, so that whether the distributed system fails or not can be accurately determined on the basis of realizing call relation tracking.
Fig. 7 is a schematic flowchart of a call relation tracking method according to a fifth embodiment of the present invention, where on the basis of any of the foregoing embodiments, as shown in fig. 7, the method further includes:
step 501, receiving a call relation tracking request;
step 502, obtaining a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
step 503, setting a calling relation log identifier for the calling relation log according to a preset naming rule;
step 504, forwarding the call relation log and the call relation log identifier to a preset data server for storage;
and 505, establishing a calling relation view according to the calling relation log, wherein the calling relation view comprises views of all the currently acquired calling relation logs.
In this embodiment, in order to enable a user to more intuitively know a calling relationship between applications, after a calling relationship log is tracked and acquired, a calling relationship view may be established according to the calling relationship log, where the calling relationship view includes views of all currently acquired calling relationship logs. Through the calling relation view, the calling relation among the applications can be quickly and intuitively checked, and the information such as the application with the largest number of times to be called, the micro-service and the like can be intuitively determined.
According to the call relation tracking method provided by the embodiment, a call relation view is established according to the call relation log, and the call relation view comprises views of all call relation logs which are acquired currently. Therefore, on the basis of realizing the tracking of the calling relationship, the user can more intuitively know the calling relationship among the applications.
Further, on the basis of any of the above embodiments, the method further includes:
receiving a viewing instruction of a user, wherein the viewing instruction is sent by the user through an interactive interface and comprises a calling relation log identifier;
acquiring a corresponding call relation log according to the call relation log identification;
and displaying the view corresponding to the call relation log to the user.
In this embodiment, the user may perform human-computer interaction with the display interface of the call relationship view. Specifically, the user may click on a view corresponding to the call relation log that the user wants to view on the interactive interface, so that after receiving a view instruction of the user, the call relation log corresponding to the view instruction may be obtained according to the view instruction. Specifically, the viewing instruction may include a calling relationship log identifier, so that the corresponding calling relationship log may be obtained according to the calling relationship log identifier, and the view corresponding to the calling relationship log is displayed to the user, so that the user may view the view.
In the call relationship tracking method provided by this embodiment, a viewing instruction of a user is received, where the viewing instruction is sent by the user through an interactive interface, and the viewing instruction includes a call relationship log identifier; acquiring a corresponding call relation log according to the call relation log identification; and displaying the view corresponding to the call relation log to the user, so that the function of man-machine interaction can be added on the basis of realizing call relation tracking, the user can check the call relation among the applications more intuitively, and the user experience is improved.
Further, on the basis of any of the above embodiments, the method further includes:
receiving an adjusting instruction of a user, wherein the adjusting instruction is sent by the user through an interactive interface and comprises calling relation view size adjusting information;
and adjusting the size of the calling relation view according to the adjusting instruction.
In this embodiment, the user may perform human-computer interaction with the display interface of the call relationship view. Specifically, the user may resize the call relationship view through the interactive interface. The method comprises the steps of receiving an adjusting instruction of a user, wherein the adjusting instruction is sent by the user through an interactive interface, the adjusting instruction comprises calling relation view size adjusting information, and the size of the calling relation view is adjusted according to the calling relation view size adjusting information, so that the adjusted size is more suitable for the user to check.
In the call relation tracking method provided by this embodiment, an adjustment instruction of a user is received, where the adjustment instruction is sent by the user through an interactive interface, and the adjustment instruction includes call relation view size adjustment information; and adjusting the size of the calling relation view according to the adjusting instruction, so that the function of man-machine interaction can be added on the basis of realizing calling relation tracking, a user can check the calling relation among the applications more intuitively, and the user experience is improved.
Fig. 8 is a schematic structural diagram of a call relation tracking apparatus according to a sixth embodiment of the present invention, and as shown in fig. 8, the call relation tracking apparatus includes:
a receiving module 61, configured to receive a call relationship tracking request;
an obtaining module 62, configured to obtain, according to the call relation tracking request, a call relation log of each application through a middleware embedded point preset in each application, where the middleware is a micro service in which a usage frequency exceeds a preset frequency threshold in each application;
the identification module 63 is configured to set a calling relationship log identification for the calling relationship log according to a preset naming rule;
and a sending module 64, configured to forward the call relation log and the call relation log identifier to a preset data server for storage.
The call relation tracking device provided by the embodiment receives a call relation tracking request; acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application; setting a calling relation log identifier for the calling relation log according to a preset naming rule; and forwarding the call relation log and the call relation log identification to a preset data server for storage. Therefore, the multi-application calling relation in the distributed system can be obtained, and in addition, the modification of upper layer codes is not needed.
Further, on the basis of any of the above embodiments, the identification module includes:
and the first setting unit is used for setting a single-byte global unique identifier for the call relation log according to a preset naming rule.
Further, on the basis of any of the above embodiments, the application has an application identifier, and the microservice has a microservice identifier;
accordingly, the identification module comprises:
and the second setting unit is used for setting calling relation log identification for the calling relation log according to the application identification, the micro-service identification and the calling sequence of each micro-service.
Further, on the basis of any one of the above embodiments, the apparatus further includes:
and the caching module is used for caching the call relation log and the call relation log identification through a ring-shaped caching structure.
Further, on the basis of any one of the above embodiments, the apparatus further includes:
the compression module is used for compressing the call relation log and the call relation log identification;
the sending module comprises:
and the first forwarding unit is used for forwarding the compressed call relation log and the call relation log identifier to a preset data server for storage.
Further, on the basis of any one of the above embodiments, the apparatus further includes:
the sampling module is used for dynamically sampling the call relation log and the call relation log identifier;
the sending module comprises:
and the second forwarding unit is used for forwarding the sampled call relation log and the call relation log identifier to a preset data server for storage.
Further, on the basis of any of the above embodiments, the sending module includes:
the first sending unit is used for forwarding the call relation log with the acquisition time not exceeding a preset first time threshold value and the call relation log identification to a preset real-time data server for storage;
and the second sending unit is used for forwarding the call relation log with the acquisition time exceeding a preset first time threshold value and the call relation log identification to a preset offline data server for storage.
Further, on the basis of any one of the above embodiments, the apparatus further includes:
the instruction receiving module is used for receiving a log analysis instruction;
the log obtaining module is used for obtaining a call relation log from the preset data server according to the log analysis instruction;
and the analysis module is used for analyzing the call relation log and judging whether the distributed database fails.
Further, on the basis of any of the above embodiments, the analysis module includes:
the first analysis unit is used for judging whether a link with calling time exceeding a preset second time threshold exists in the calling relation log or not; and/or the presence of a gas in the gas,
the second analysis unit is used for calculating the called times of each application and/or micro service in the calling relation log and determining the importance degree of each application and/or micro service according to the called times of each application and/or micro service; and/or the presence of a gas in the gas,
the third analysis unit is used for calculating the time consumption information of each link in the call relation log; and/or the presence of a gas in the gas,
the fourth analysis unit is used for calculating the time-consuming information of each link in the call relation log and comparing the time-consuming information with preset standard time-consuming information; and/or the presence of a gas in the gas,
the fifth analysis unit is used for counting the calling relationship of each application and/or microservice in the calling relationship log; and/or the presence of a gas in the gas,
and the sixth analysis unit is used for counting the call relation of each application and/or micro service in the call relation log and performing bottleneck analysis on the call relation log according to the call relation.
Further, on the basis of any one of the above embodiments, the apparatus further includes:
and the view establishing module is used for establishing a calling relationship view according to the calling relationship log, wherein the calling relationship view comprises views of all the calling relationship logs which are acquired currently.
Further, on the basis of any one of the above embodiments, the apparatus further includes:
the system comprises a viewing instruction receiving module, a processing module and a processing module, wherein the viewing instruction receiving module is used for receiving a viewing instruction of a user, the viewing instruction is sent by the user through an interactive interface, and the viewing instruction comprises a calling relation log identifier;
the calling relation log obtaining module is used for obtaining a corresponding calling relation log according to the calling relation log identification;
and the display module is used for displaying the view corresponding to the call relation log to the user.
Further, on the basis of any one of the above embodiments, the apparatus further includes:
the adjustment instruction receiving module is used for receiving an adjustment instruction of a user, wherein the adjustment instruction is sent by the user through an interactive interface and comprises calling relation view size adjustment information;
and the adjusting module is used for adjusting the size of the calling relation view according to the adjusting instruction.
Fig. 9 is a schematic structural diagram of a call relation tracking device according to a seventh embodiment of the present invention, and as shown in fig. 9, the call relation tracking device includes: a memory 71, a processor 72;
a memory 71; a memory 71 for storing instructions executable by the processor 72;
wherein the processor 72 is configured to execute the call relation tracking method according to any of the above embodiments by the processor 72.
Yet another embodiment of the present invention further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the computer-executable instructions are used to implement the call relation tracking method according to any one of the above embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (15)

1. A call relation tracking method, comprising:
receiving a call relation tracking request;
acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
setting a calling relation log identifier for the calling relation log according to a preset naming rule;
and forwarding the call relation log and the call relation log identification to a preset data server for storage.
2. The method according to claim 1, wherein the setting of the call relation log identifier for the call relation log according to a preset naming rule comprises:
and setting a single-byte global unique identifier for the call relation log according to a preset naming rule.
3. The method of claim 1, wherein the application has an application identification and the microservice has a microservice identification;
correspondingly, the setting of the call relation log identifier for the call relation log according to the preset naming rule includes:
and setting a calling relation log identifier for the calling relation log according to the application identifier, the micro-service identifier and the calling sequence of each micro-service.
4. The method according to any one of claims 1 to 3, wherein before forwarding the call relation log and the call relation log identifier to a preset data server for storage, the method further comprises:
and caching the call relation log and the call relation log identification through a ring cache structure.
5. The method according to any one of claims 1 to 3, wherein before forwarding the call relation log and the call relation log identifier to a preset data server for storage, the method further comprises:
compressing the call relation log and the call relation log identification;
the forwarding the call relation log and the call relation log identifier to a preset data server for storage includes:
and forwarding the compressed call relation log and the call relation log identification to a preset data server for storage.
6. The method according to any one of claims 1 to 3, wherein before forwarding the call relation log and the call relation log identifier to a preset data server for storage, the method further comprises:
dynamically sampling the call relation log and the call relation log identification;
the forwarding the call relation log and the call relation log identifier to a preset data server for storage includes:
and forwarding the sampled call relation log and the call relation log identifier to a preset data server for storage.
7. The method according to any one of claims 1 to 3, wherein the forwarding the call relation log and the call relation log identifier to a preset data server for storage comprises:
forwarding the call relation log with the acquisition time not exceeding a preset first time threshold value and the call relation log identification to a preset real-time data server for storage;
and forwarding the call relation log with the acquisition time exceeding a preset first time threshold and the call relation log identification to a preset offline data server for storage.
8. The method according to any one of claims 1 to 3, wherein after forwarding the call relation log and the call relation log identifier to a preset data server for storage, the method further comprises:
receiving a log analysis instruction;
acquiring a call relation log from the preset data server according to the log analysis instruction;
and analyzing the call relation log and judging whether the distributed database has a fault.
9. The method of claim 8, wherein analyzing the call relation log comprises:
judging whether a link with calling time exceeding a preset second time threshold exists in the calling relation log or not; and/or the presence of a gas in the gas,
calculating the calling times of each application and/or micro service in the calling relation log, and determining the importance degree of each application and/or micro service according to the calling times of each application and/or micro service; and/or the presence of a gas in the gas,
calculating the time-consuming information of each link in the call relation log; and/or the presence of a gas in the gas,
calculating time-consuming information of each link in the call relation log, and comparing the time-consuming information with preset standard time-consuming information; and/or the presence of a gas in the gas,
counting the calling relation of each application and/or micro service in the calling relation log; and/or the presence of a gas in the gas,
and counting the call relation of each application and/or micro service in the call relation log, and performing bottleneck analysis on the call relation log according to the call relation.
10. The method according to any one of claims 1 to 3 and 9, wherein after forwarding the call relation log and the call relation log identifier to a preset data server for storage, the method further comprises:
and establishing a calling relation view according to the calling relation log, wherein the calling relation view comprises views of all the currently acquired calling relation logs.
11. The method of claim 10, further comprising:
receiving a viewing instruction of a user, wherein the viewing instruction is sent by the user through an interactive interface and comprises a calling relation log identifier;
acquiring a corresponding call relation log according to the call relation log identification;
and displaying the view corresponding to the call relation log to the user.
12. The method of claim 10, further comprising:
receiving an adjusting instruction of a user, wherein the adjusting instruction is sent by the user through an interactive interface and comprises calling relation view size adjusting information;
and adjusting the size of the calling relation view according to the adjusting instruction.
13. An invocation relationship tracking apparatus, comprising:
the receiving module is used for receiving a calling relation tracking request;
the acquisition module is used for acquiring a calling relation log of each application through a middleware embedded point preset in each application according to the calling relation tracking request, wherein the middleware is a micro-service with the use frequency exceeding a preset frequency threshold value in each application;
the identification module is used for setting calling relation log identification for the calling relation log according to a preset naming rule;
and the sending module is used for forwarding the call relation log and the call relation log identifier to a preset data server for storage.
14. A call relation tracking apparatus, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the call relation tracking method of any one of claims 1-12 by the processor.
15. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, implement the call relation tracking method of any one of claims 1-12.
CN201910557465.XA 2019-06-25 2019-06-25 Call relation tracking method, device, equipment and computer readable storage medium Pending CN112131070A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910557465.XA CN112131070A (en) 2019-06-25 2019-06-25 Call relation tracking method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910557465.XA CN112131070A (en) 2019-06-25 2019-06-25 Call relation tracking method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112131070A true CN112131070A (en) 2020-12-25

Family

ID=73849462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910557465.XA Pending CN112131070A (en) 2019-06-25 2019-06-25 Call relation tracking method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112131070A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1722086A (en) * 2004-06-21 2006-01-18 微软公司 API for programmatic retrieval and replay of database trace
CN105224445A (en) * 2015-10-28 2016-01-06 北京汇商融通信息技术有限公司 Distributed tracking system
CN106294091A (en) * 2016-08-11 2017-01-04 福建富士通信息软件有限公司 A kind of without intrusive mood daily record interception method for analyzing performance and system
CN106790718A (en) * 2017-03-16 2017-05-31 北京搜狐新媒体信息技术有限公司 Service call link analysis method and system
CN107025222A (en) * 2016-01-29 2017-08-08 五八同城信息技术有限公司 A kind of distributed information log acquisition method and device
CN108038145A (en) * 2017-11-23 2018-05-15 携程旅游网络技术(上海)有限公司 Distributed Services tracking, system, storage medium and electronic equipment
US20180203795A1 (en) * 2017-01-18 2018-07-19 Pivotal Software, Inc. Trace management
CN108536854A (en) * 2018-04-16 2018-09-14 深圳市国富前海区块链技术股份有限公司 The method, apparatus and computer readable storage medium of data interaction
CN109460307A (en) * 2018-10-15 2019-03-12 厦门商集网络科技有限责任公司 Micro services a little, which are buried, based on log calls tracking and its system
CN109656700A (en) * 2018-12-17 2019-04-19 广州市玄武无线科技股份有限公司 Distributed link tracking, system, equipment and storage medium under multi-tenant

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1722086A (en) * 2004-06-21 2006-01-18 微软公司 API for programmatic retrieval and replay of database trace
CN105224445A (en) * 2015-10-28 2016-01-06 北京汇商融通信息技术有限公司 Distributed tracking system
CN107025222A (en) * 2016-01-29 2017-08-08 五八同城信息技术有限公司 A kind of distributed information log acquisition method and device
CN106294091A (en) * 2016-08-11 2017-01-04 福建富士通信息软件有限公司 A kind of without intrusive mood daily record interception method for analyzing performance and system
US20180203795A1 (en) * 2017-01-18 2018-07-19 Pivotal Software, Inc. Trace management
CN106790718A (en) * 2017-03-16 2017-05-31 北京搜狐新媒体信息技术有限公司 Service call link analysis method and system
CN108038145A (en) * 2017-11-23 2018-05-15 携程旅游网络技术(上海)有限公司 Distributed Services tracking, system, storage medium and electronic equipment
CN108536854A (en) * 2018-04-16 2018-09-14 深圳市国富前海区块链技术股份有限公司 The method, apparatus and computer readable storage medium of data interaction
CN109460307A (en) * 2018-10-15 2019-03-12 厦门商集网络科技有限责任公司 Micro services a little, which are buried, based on log calls tracking and its system
CN109656700A (en) * 2018-12-17 2019-04-19 广州市玄武无线科技股份有限公司 Distributed link tracking, system, equipment and storage medium under multi-tenant

Similar Documents

Publication Publication Date Title
US9369521B2 (en) Naming of distributed business transactions
CN109067890B (en) CDN node edge computing system based on docker container
CN107370806B (en) HTTP status code monitoring method, device, storage medium and electronic equipment
CN111045911B (en) Performance test method, performance test device, storage medium and electronic equipment
CN111309550A (en) Data acquisition method, system, equipment and storage medium of application program
US11294740B2 (en) Event to serverless function workflow instance mapping mechanism
US9489241B2 (en) Guaranteed response pattern
US9367418B2 (en) Application monitoring
CN110457132B (en) Method and device for creating functional object and terminal equipment
CN114760233A (en) Service processing method and device, electronic equipment and storage medium
CN112131070A (en) Call relation tracking method, device, equipment and computer readable storage medium
CN109218338B (en) Information processing system, method and device
CN115525411A (en) Method, device, electronic equipment and computer readable medium for processing service request
CN106533819B (en) Error monitoring method, device and system for online service
CN114090514A (en) Log retrieval method and device for distributed system
CN111338775B (en) Method and equipment for executing timing task
CN109688432B (en) Information transmission method, device and system
CN113761433A (en) Service processing method and device
CN113779018A (en) Data processing method and device
CN111930385A (en) Data acquisition method, device, equipment and storage medium
CN112559001A (en) Method and device for updating application
CN110750563A (en) Multi-model data processing method, system, device, electronic equipment and storage medium
CN117176613B (en) Data acquisition method and device
CN113726872B (en) Method, device, equipment and medium for filtering promotion information
CN117041083A (en) Application monitoring method, device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination