CN114844797A - Call chain log and monitoring log association method and micro-service anomaly detection method - Google Patents
Call chain log and monitoring log association method and micro-service anomaly detection method Download PDFInfo
- Publication number
- CN114844797A CN114844797A CN202210594368.XA CN202210594368A CN114844797A CN 114844797 A CN114844797 A CN 114844797A CN 202210594368 A CN202210594368 A CN 202210594368A CN 114844797 A CN114844797 A CN 114844797A
- Authority
- CN
- China
- Prior art keywords
- micro
- service
- log
- monitoring
- calling
- 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
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 200
- 238000000034 method Methods 0.000 title claims abstract description 61
- 238000001514 detection method Methods 0.000 title claims description 16
- 230000002159 abnormal effect Effects 0.000 claims abstract description 83
- 230000015654 memory Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 12
- 230000004044 response Effects 0.000 claims description 5
- 230000005856 abnormality Effects 0.000 claims description 4
- 238000012423 maintenance Methods 0.000 abstract description 14
- 238000010586 diagram Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 230000007246 mechanism Effects 0.000 description 5
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 239000003795 chemical substances by application Substances 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000003321 amplification Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/069—Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present disclosure relates to the field of distributed architecture, and in particular, to a method for associating a call chain log with a monitoring log and a method for detecting micro-service anomalies. The method comprises the steps of obtaining a plurality of call chain logs and initial monitoring logs corresponding to the call chain logs in real time; acquiring a calling request identifier of each calling chain log and a micro-service calling link identifier corresponding to each micro-service in real time; and adding the calling request identifier and the micro-service calling link identifier into the initial monitoring log in real time to obtain an associated monitoring log, so that the monitoring log after the identifier is added and the calling link called by the micro-service form association. The method can realize the association of the monitoring log and the calling chain, and when the calling chain finds that the state of a certain micro service is abnormal, the monitoring log of the service in the current calling chain can be inquired in a one-key association manner; on the contrary, when the log is inquired, the related call chain can be accurately jumped according to the call request identifier and the micro-service call link identifier, so that an operation and maintenance debugging closed loop is formed, and the operation and maintenance efficiency is improved.
Description
Technical Field
The present disclosure relates to the field of distributed architecture, and in particular, to a method for associating a call chain log with a monitoring log and a method for detecting micro-service anomalies.
Background
With the gradual popularization of the distributed micro-service architecture, call chain monitoring becomes a necessary means for rapidly positioning and analyzing problems; meanwhile, log monitoring (including unified log collection, log storage and full-text log retrieval) is also an important means for helping operation and maintenance personnel to efficiently investigate the reasons of system errors.
In the prior art, a debugging method for a distributed micro-service architecture generally comprises the following steps: after a problem of a certain system is found from a calling chain, the system is manually switched to a monitoring log retrieval page, corresponding log information is inquired from a large number of log records in the monitoring log retrieval page according to the specific attribute of the system with the problem, and the method for manually and manually debugging is low in efficiency. In addition, although the prior art has a call chain monitoring function and a full-text retrieval function, the log monitoring and the call chain monitoring are independent from each other and are not associated with each other.
Aiming at the problem that the specific abnormal reason of the microservice cannot be monitored according to the system with problems in the prior art, a method for associating a call chain log with a monitoring log and a method for detecting the abnormal condition of the microservice are needed.
Disclosure of Invention
To solve the above problems in the prior art, embodiments herein provide a method for associating a call chain log with a monitoring log and a method for detecting micro-service anomaly.
The embodiment of the invention provides a method for associating a call chain log with a monitoring log, which comprises the following steps: acquiring a plurality of call chain logs and initial monitoring logs corresponding to the call chain logs in real time; acquiring a calling request identifier of each calling chain log and a micro-service calling link identifier corresponding to each micro-service in real time; and adding the calling request identifier and the micro-service calling link identifier into the monitoring log in real time to obtain an associated monitoring log, so that the associated monitoring log and the calling link called by the micro-service form association.
According to one aspect of the embodiments herein, when a micro service is called every time, a call request identifier in each call chain log and a micro service call link identifier corresponding to each micro service are obtained in real time; adding the calling request identifier and the micro-service calling link identifier into a monitoring log in real time comprises the following steps: setting a position of an identifier to be added in the monitoring log; and storing the calling request identifier and the micro-service calling link identifier to the identifier to be added of the monitoring log of the micro-service.
The embodiment of the invention provides a micro-service abnormity detection method, which comprises the following steps: collecting a plurality of associated monitoring logs of the micro-service, wherein a calling request identifier and a micro-service calling link identifier are recorded in the associated monitoring logs; determining abnormal micro-services according to monitoring indexes corresponding to the micro-services; acquiring a calling request identifier and a micro-service calling link identifier of the abnormal micro-service from the calling link log of the abnormal micro-service; calling a monitoring log to be analyzed from the associated monitoring logs of the micro services according to the calling request identifier of the abnormal micro service and the micro service calling link identifier; and analyzing the monitoring log to be analyzed to determine abnormal monitoring information of the microservice.
According to an aspect of an embodiment herein, analyzing the monitoring log to be analyzed to determine abnormal monitoring information of the microservice includes: searching each abnormal monitoring information in the abnormal field from the monitoring log to be analyzed; and taking the searched abnormal monitoring information as the abnormal monitoring information of the micro service.
According to an aspect of the embodiments herein, determining an abnormal microservice according to a monitoring index corresponding to a plurality of microservices includes: and determining abnormal micro-services according to at least one of the transaction success rate, the transaction amount and the transaction average response time of the plurality of micro-services.
The embodiment herein further provides a call chain detection method, including: acquiring associated monitoring logs of a plurality of micro services, wherein calling request identifiers and micro service calling link identifiers are recorded in the associated monitoring logs; determining micro-services related to the abnormal monitoring information and calling request identifications and micro-service calling identifications corresponding to the micro-services according to the abnormal monitoring information in the associated monitoring log; and determining a call chain log of the micro service according to the call request identifier and the micro service call identifier.
An embodiment herein provides an apparatus for associating a call chain log with a monitoring log, the apparatus including: the log obtaining unit is used for obtaining a plurality of call chain logs and initial monitoring logs corresponding to the call chain logs in real time; the identification acquisition unit is used for acquiring the calling request identification of each calling chain log and the micro-service calling link identification corresponding to each micro-service in real time; and the association unit is used for adding the calling request identifier and the micro-service calling link identifier into the initial monitoring log in real time to obtain an associated monitoring log, so that the associated monitoring log and the calling link called by the micro-service form association.
Embodiments herein provide a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the call chain log and monitor log association method, the microservice anomaly detection method, and the call chain detection method when executing the computer program.
Embodiments herein provide a computer-readable storage medium storing a computer program, which when executed by a processor implements the call chain log and monitor log association method, the micro-service anomaly detection method, and the call chain detection method.
Embodiments herein provide a computer program product comprising a computer program that, when executed by a processor, implements the call chain log and monitor log association method, the microservice anomaly detection method, and the call chain detection method.
The method can realize the association of the monitoring log and the calling chain, and when the calling chain finds that the state of a certain micro service is abnormal, the monitoring log of the service in the current calling chain can be inquired in a one-key association manner; on the contrary, when the log is inquired, the related call chain can be accurately jumped according to the call request identifier and the micro-service call link identifier, so that an operation and maintenance debugging closed loop is formed, and the operation and maintenance efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments or 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 only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow diagram illustrating a method for associating a call chain log with a monitoring log according to an embodiment of the disclosure;
fig. 2 is a flowchart illustrating a method for adding a call request identifier and a micro service call link identifier to a monitoring log in real time according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a method for detecting microservice anomaly according to an embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating a method for detecting microservice anomaly according to an embodiment of the present disclosure;
FIG. 5 is a flow diagram illustrating a call chain detection method according to an embodiment of the disclosure;
FIG. 6 is a schematic illustration of a call link display interface between microservices according to an embodiment herein;
FIG. 7 is a schematic structural diagram illustrating an apparatus for associating a call chain log with a monitoring log according to an embodiment of the present disclosure;
FIG. 8 is a schematic structural diagram illustrating an apparatus for associating a call chain log with a monitoring log according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure.
Description of the symbols of the drawings:
701. a log obtaining unit;
7011. a call chain log obtaining module;
7012. an initial monitoring log obtaining module;
702. an identification acquisition unit;
7021. a mark position setting module to be added;
703. an association unit;
902. a computer device;
904. a processor;
906. a memory;
908. a drive mechanism;
910. an input/output module;
912. an input device;
914. an output device;
916. a presentation device;
918. a graphical user interface;
920. a network interface;
922. a communication link;
924. a communication bus.
Detailed Description
In order to make the technical solutions in the present specification better understood, 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 only a part of the embodiments, but not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments herein without making any creative effort, shall fall within the scope of protection.
It should be noted that the terms "first," "second," and the like in the description and claims herein and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments herein described are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or device.
The present specification provides method steps as described in the examples or flowcharts, but may include more or fewer steps based on routine or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual system or apparatus product executes, it can execute sequentially or in parallel according to the method shown in the embodiment or the figures.
It should be noted that the call chain log and monitoring log association method can be used in the field of software development, and can also be used in other fields besides the field of software development, such as the field of distributed architecture, the field of finance, and the like. The application field of the method and the device for associating the call chain log and the monitoring log is not limited.
The method is applied to the distributed micro-service system, the distributed micro-service system can acquire the calling relationship among the micro-services according to the service request and generate the calling chain logs corresponding to each micro-service and the initial monitoring logs corresponding to each calling chain log.
Fig. 1 is a flowchart illustrating a method for associating a call chain log with a monitoring log according to an embodiment of the present disclosure, including the following steps:
In some embodiments of the present disclosure, the initial monitoring log corresponds to an application system or a microservice, and when an application system or a microservice is called each time, a monitoring log information record is printed in the initial monitoring log. In this step, the content recorded by the initial monitoring log at least should be abnormal information occurring in the operation of the application system, including but not limited to the following: the application system can detect calling program, function error information and transaction code error, various information such as databases and middleware with specific abnormal return, and other related abnormal information needing attention and resolution of operation and maintenance parties, such as service failure caused by non-customer factors. Through the initial monitoring log, the operation and maintenance personnel can check the reason why the micro service or the calling chain is abnormal.
When the distributed microservice architecture generates the call chain logs and the initial monitoring logs in real time, the call chain logs and the initial monitoring logs corresponding to the call chain logs can be obtained in real time. The method comprises the steps of installing a log collection agent of the TSF on each application server, and collecting a monitoring log and a call chain log under an appointed directory of an application system to the TSF.
In this step, a plurality of call chain logs and a plurality of initial monitoring logs can be obtained simultaneously. For example, 3 transfer transaction requests occur within 1 second, and each transfer transaction requires three microservices to be invoked, microservices S1, microservices S2, and microservices S3. Then 3 call chain logs and 3 initial monitoring logs corresponding to the 3 call chain logs can be obtained in real time.
And step 102, acquiring the call request identification of each call chain log and the micro-service call link identification corresponding to each micro-service in real time. In this step, each call chain log includes a unique call request identifier and a micro-service call link identifier corresponding to each micro-service. The calling request identification is generated by a first server in a complete transaction and transmitted on the whole calling link, and is kept constant. The microservice call link identification is generated by the originator of a microservice call. If the same micro service is called in different transaction requests, the micro service calling link identifications corresponding to the micro service are different. Specifically, the calling request identifier is traceID, and the micro-service calling link identifier is spanID. And acquiring a call chain request identification and a micro-service call link identification in a call chain log from a mapping diagnosis context tool (MDC) in the step 101 by using a pattern component (pattern).
Fig. 2 is a flowchart of a method for adding a call request identifier and a micro-service call identifier to a monitoring log in real time according to an embodiment of the present disclosure, including the following steps:
In the step, the monitoring log with the mark position to be added is coded in a UID-8 format. The positions to be added with the mark are separated by "|". Wherein, the first field of the associated monitoring log is timestamp, and the printing time of the log is identified; the second field is level, identifying the log level. Wherein, the log level comprises the levels of DEBUG, WARN, ERROR and the like; the third field is a global serial number, the fourth field is a running water sub-serial number, the fifth field and the sixth field end mark-to-be-added position, the mark-to-be-added positions are a traceID and a spanID respectively, and the mark-to-be-added positions are a call request mark and a micro-service call link mark respectively. Other fields of the associated monitoring log are fields of service/module name, service/application version number, interface coding/method name, interface version number, error code, custom area, information content description and the like.
Fig. 3 shows a method for detecting micro-service anomaly according to an embodiment of the present disclosure, which specifically includes the following steps:
In some embodiments of the present description, determining the abnormal microservice according to the monitoring index corresponding to the plurality of microservices includes: and determining abnormal micro-services according to at least one of the transaction success rate, the transaction amount and the transaction average response time of the plurality of micro-services. For example, the transaction success rate is determined according to the ratio of the number of successful transaction executions to the total number of transactions in a period of time, and is compared with a preset transaction success rate threshold value to determine whether the micro-service is abnormal or not; for another example, whether the micro-service is abnormal or not is determined according to the comparison between the number of transactions occurring within a period of time and a preset transaction amount threshold; for another example, whether the micro-service is abnormal or not is determined according to the comparison between the average response time of the transaction within a period of time and a preset average response time threshold of the transaction. According to the abnormal result of any one monitoring index in the monitoring indexes of the micro-service, the micro-service can be determined to be abnormal. In some embodiments of the present description, the monitoring indicator may be displayed on a display interface in conjunction with the microservice. When the monitoring index is abnormal, the monitoring index can be displayed in a display interface in modes of red marking, amplification, dynamic reminding and the like, and is used for reminding the micro-service of abnormal occurrence.
And 304, calling a monitoring log to be analyzed from the associated monitoring logs of the multiple microservices according to the calling request identifier of the abnormal microservices and the identifier of the microservice calling link. Specifically, from the associated monitoring logs corresponding to the application system or the multiple micro services collected in the flow manner in step 301, the associated monitoring log of the abnormal micro service is searched according to the calling request identifier of the abnormal micro service and the micro service calling link identifier, that is, the monitoring log to be analyzed.
Fig. 4 is a flowchart illustrating a method for detecting micro-service anomaly according to an embodiment of the present disclosure, which specifically includes the following steps:
In some embodiments of the present specification, when an exception occurs in a state where a micro service occurs through a call chain, a key may be used to query an association monitoring log of the micro service in the current call chain, so as to further determine a specific reason for the exception occurring in the micro service. Operation and maintenance personnel do not need to retrieve the monitoring logs according to the calling chain information, and operation and maintenance debugging efficiency is improved.
Fig. 5 is a schematic diagram illustrating a call chain detection method according to an embodiment of the present disclosure, including the following steps:
For example, the occurrence of abnormal monitoring information in the information content description field in the associated monitoring log corresponding to a certain application system indicates that the reason for the abnormality is: the memory overflows. And determining a calling request identifier and a micro-service calling identifier in a monitoring log record to which the abnormal monitoring information belongs according to the field to which the abnormal monitoring information belongs.
Fig. 6 is a schematic diagram illustrating a display interface of a call link between microservices according to an embodiment of the present disclosure. The figure shows a calling link to which the micro-service belongs and a monitoring log corresponding to the micro-service. The figure shows the call link for the application named BPCS-D. The services named bocs-dnf _ credit module belong to the same micro service, have the same service instance (server address) and interface, but belong to different components. Thus, bocs-dnf _ credit module microservices serve different components (application systems), in different call chain relationships. Here, the state of the microservice having sequence number 1 is "404", indicating that the state of the microservice is abnormal. Then under the option of "operation", the "application log" button can be clicked by one key to obtain the monitoring log of the abnormal micro-service with sequence number 1. And further acquiring the abnormal reason of the abnormal micro-service according to the specific field in the monitoring log.
Fig. 7 is a schematic structural diagram of an apparatus for associating call chain logs with monitoring logs according to an embodiment of the present disclosure, where a basic structure of the apparatus for associating call chain logs with monitoring logs is described in the present diagram, where functional units and modules may be implemented in a software manner, or implemented by a general chip or a specific chip, to implement association between call chain logs and monitoring logs, and the apparatus specifically includes:
a log obtaining unit 701, configured to obtain, in real time, multiple call chain logs and initial monitoring logs corresponding to the multiple call chain logs;
an identifier obtaining unit 702, configured to obtain, in real time, a call request identifier of each call chain log and a micro-service call link identifier corresponding to each micro-service in each call chain log;
an associating unit 703, configured to add the call request identifier and the micro service call link identifier to the initial monitoring log in real time, so that the monitoring log after the identifier is added forms an association with the call link called by the micro service, and the monitoring log after the identifier is added is an associated monitoring log.
The method can realize the association of the monitoring log and the calling chain, and when the calling chain finds that the state of a certain micro service is abnormal, the monitoring log of the service in the current calling chain can be inquired in a one-key association manner; on the contrary, when the log is inquired, the related call chain can be accurately jumped according to the call request identifier and the micro-service call link identifier, so that an operation and maintenance debugging closed loop is formed, and the operation and maintenance efficiency is improved.
As an embodiment herein, refer to a specific structural schematic diagram of the call chain log and monitor log associating apparatus in this embodiment as shown in fig. 8.
As an embodiment herein, the log obtaining unit 701 further includes: a call chain log obtaining module 7011, configured to obtain a call chain log;
an initial monitoring log obtaining module 7012, configured to obtain an initial monitoring log;
as an embodiment herein, the identification obtaining unit 702 further includes:
and the mark position to be added setting module 7021 is configured to set a mark position to be added in the initial monitoring log.
As shown in fig. 9, for a computer device provided for embodiments herein, the computer device 902 may include one or more processors 904, such as one or more Central Processing Units (CPUs), each of which may implement one or more hardware threads. The computer device 902 may also include any memory 906 for storing any kind of information, such as code, settings, data, etc. For example, and without limitation, memory 906 may include any one or more of the following in combination: any type of RAM, any type of ROM, flash memory devices, hard disks, optical disks, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent fixed or removable components of computer device 902. In one case, when the processor 904 executes the associated instructions, which are stored in any memory or combination of memories, the computer device 902 can perform any of the operations of the associated instructions. The computer device 902 also includes one or more drive mechanisms 908, such as a hard disk drive mechanism, an optical disk drive mechanism, etc., for interacting with any memory.
Corresponding to the methods in fig. 1 to 5, the embodiments herein also provide a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, performs the steps of the above-described method.
Embodiments herein also provide computer readable instructions, wherein a program therein causes a processor to perform the method as shown in fig. 1-5 when the instructions are executed by the processor.
It should be understood that, in various embodiments herein, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments herein.
It should also be understood that, in the embodiments herein, the term "and/or" is only one kind of association relation describing an associated object, meaning that three kinds of relations may exist. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided herein, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electrical, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the elements may be selected according to actual needs to achieve the objectives of the embodiments herein.
In addition, functional units in the embodiments herein may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present invention may be implemented in a form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The principles and embodiments of this document are explained herein using specific examples, which are presented only to aid in understanding the methods and their core concepts; meanwhile, for a person skilled in the art, according to the idea of the present disclosure, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present disclosure should not be construed as a limitation to the present disclosure.
Claims (10)
1. A method for associating a call chain log with a monitoring log is characterized by comprising the following steps:
acquiring a plurality of call chain logs and initial monitoring logs corresponding to the call chain logs in real time;
acquiring a calling request identifier of each calling chain log and a micro-service calling link identifier corresponding to each micro-service in real time;
and adding the calling request identifier and the micro-service calling link identifier into the initial monitoring log in real time to obtain an associated monitoring log, so that the associated monitoring log and the calling link called by the micro-service form association.
2. The method for associating the call chain log with the monitoring log according to claim 1, wherein when the micro-service is called every time, the call request identifier in each call chain log and the micro-service call link identifier corresponding to each micro-service are obtained in real time;
adding the calling request identifier and the micro-service calling link identifier into an initial monitoring log in real time comprises the following steps:
setting a position of an identifier to be added in the initial monitoring log;
and storing the calling request identifier and the micro-service calling link identifier to the position of the identifier to be added of the associated monitoring log of the micro-service.
3. A micro-service anomaly detection method, characterized in that the method comprises:
collecting a plurality of associated monitoring logs of the micro-service, wherein a calling request identifier and a micro-service calling link identifier are recorded in the associated monitoring logs;
determining abnormal micro-services according to monitoring indexes corresponding to the micro-services;
acquiring a calling request identifier and a micro-service calling link identifier of the abnormal micro-service from the calling link log of the abnormal micro-service;
calling a monitoring log to be analyzed from the associated monitoring logs of the micro services according to the calling request identifier of the abnormal micro service and the micro service calling link identifier;
and analyzing the monitoring log to be analyzed, and determining abnormal monitoring information of the micro service.
4. The method for detecting microservice abnormality according to claim 3, wherein analyzing the monitoring log to be analyzed to determine abnormality monitoring information of the microservice comprises:
searching each abnormal monitoring information in the abnormal field from the monitoring log to be analyzed;
and taking the searched abnormal monitoring information as the abnormal monitoring information of the micro service.
5. The micro-service anomaly detection method according to claim 3, wherein determining abnormal micro-services according to the monitoring indicators corresponding to the plurality of micro-services comprises:
and determining abnormal micro-services according to at least one of the transaction success rate, the transaction amount and the transaction average response time of the plurality of micro-services.
6. A call chain detection method, the method comprising:
collecting a plurality of associated monitoring logs of the micro-service, wherein a calling request identifier and a micro-service calling link identifier are recorded in the associated monitoring logs;
determining micro-services related to the abnormal monitoring information and calling request identifications and micro-service calling identifications corresponding to the micro-services according to the abnormal monitoring information in the associated monitoring log;
and determining a call chain log of the micro service according to the call request identifier and the micro service call identifier.
7. An apparatus for associating a call chain log with a monitor log, the apparatus comprising:
the log obtaining unit is used for obtaining a plurality of call chain logs and initial monitoring logs corresponding to the call chain logs in real time;
the identification acquisition unit is used for acquiring the calling request identification of each calling chain log and the micro-service calling link identification corresponding to each micro-service in real time;
and the association unit is used for adding the calling request identifier and the micro-service calling link identifier into the initial monitoring log in real time to obtain an associated monitoring log, so that the associated monitoring log and the calling link called by the micro-service form association.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any one of claims 1 to 6.
10. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, carries out the method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210594368.XA CN114844797A (en) | 2022-05-27 | 2022-05-27 | Call chain log and monitoring log association method and micro-service anomaly detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210594368.XA CN114844797A (en) | 2022-05-27 | 2022-05-27 | Call chain log and monitoring log association method and micro-service anomaly detection method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114844797A true CN114844797A (en) | 2022-08-02 |
Family
ID=82572690
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210594368.XA Pending CN114844797A (en) | 2022-05-27 | 2022-05-27 | Call chain log and monitoring log association method and micro-service anomaly detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114844797A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115242613A (en) * | 2022-08-03 | 2022-10-25 | 浙江网商银行股份有限公司 | Target node determination method and device |
CN116016646A (en) * | 2022-11-07 | 2023-04-25 | 中国工商银行股份有限公司 | Service access control method, device, equipment and medium |
CN116094925A (en) * | 2023-01-05 | 2023-05-09 | 瓴创(北京)科技有限公司 | Data hierarchical identification method, system and storage medium for micro-service architecture |
CN117808570A (en) * | 2024-02-29 | 2024-04-02 | 梅州客商银行股份有限公司 | Method and device for monitoring all links of bank distributed system and electronic equipment |
CN117827620A (en) * | 2024-03-05 | 2024-04-05 | 云账户技术(天津)有限公司 | Abnormality diagnosis method, training device, training equipment, and recording medium |
CN117950949A (en) * | 2024-01-16 | 2024-04-30 | 朴道征信有限公司 | Micro service log storage method, micro service log storage device, electronic equipment and computer readable medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110113200A (en) * | 2019-04-29 | 2019-08-09 | 平安科技(深圳)有限公司 | The correlating method of chain-circuit system and log system, device and storage medium |
CN110535722A (en) * | 2019-08-27 | 2019-12-03 | 江苏瑞中数据股份有限公司 | A kind of full link operation and monitoring method of the micro services in cross-safety zone domain |
US20200364035A1 (en) * | 2019-05-16 | 2020-11-19 | Citrix Systems, Inc. | Systems and methods for using a call chain to identify dependencies among a plurality of microservices |
CN112612675A (en) * | 2020-12-25 | 2021-04-06 | 山东经伟晟睿数据技术有限公司 | Distributed big data log link tracking method and system under micro-service architecture |
CN114189430A (en) * | 2021-12-09 | 2022-03-15 | 兴业银行股份有限公司 | Three-dimensional log full-link monitoring system, method, medium and equipment |
-
2022
- 2022-05-27 CN CN202210594368.XA patent/CN114844797A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110113200A (en) * | 2019-04-29 | 2019-08-09 | 平安科技(深圳)有限公司 | The correlating method of chain-circuit system and log system, device and storage medium |
US20200364035A1 (en) * | 2019-05-16 | 2020-11-19 | Citrix Systems, Inc. | Systems and methods for using a call chain to identify dependencies among a plurality of microservices |
CN110535722A (en) * | 2019-08-27 | 2019-12-03 | 江苏瑞中数据股份有限公司 | A kind of full link operation and monitoring method of the micro services in cross-safety zone domain |
CN112612675A (en) * | 2020-12-25 | 2021-04-06 | 山东经伟晟睿数据技术有限公司 | Distributed big data log link tracking method and system under micro-service architecture |
CN114189430A (en) * | 2021-12-09 | 2022-03-15 | 兴业银行股份有限公司 | Three-dimensional log full-link monitoring system, method, medium and equipment |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115242613A (en) * | 2022-08-03 | 2022-10-25 | 浙江网商银行股份有限公司 | Target node determination method and device |
CN115242613B (en) * | 2022-08-03 | 2024-03-15 | 浙江网商银行股份有限公司 | Target node determining method and device |
CN116016646A (en) * | 2022-11-07 | 2023-04-25 | 中国工商银行股份有限公司 | Service access control method, device, equipment and medium |
CN116016646B (en) * | 2022-11-07 | 2024-05-28 | 中国工商银行股份有限公司 | Service access control method, device, equipment and medium |
CN116094925A (en) * | 2023-01-05 | 2023-05-09 | 瓴创(北京)科技有限公司 | Data hierarchical identification method, system and storage medium for micro-service architecture |
CN116094925B (en) * | 2023-01-05 | 2024-02-13 | 瓴创(北京)科技有限公司 | Data hierarchical identification method, system and storage medium for micro-service architecture |
CN117950949A (en) * | 2024-01-16 | 2024-04-30 | 朴道征信有限公司 | Micro service log storage method, micro service log storage device, electronic equipment and computer readable medium |
CN117808570A (en) * | 2024-02-29 | 2024-04-02 | 梅州客商银行股份有限公司 | Method and device for monitoring all links of bank distributed system and electronic equipment |
CN117808570B (en) * | 2024-02-29 | 2024-05-07 | 梅州客商银行股份有限公司 | Method and device for monitoring all links of bank distributed system and electronic equipment |
CN117827620A (en) * | 2024-03-05 | 2024-04-05 | 云账户技术(天津)有限公司 | Abnormality diagnosis method, training device, training equipment, and recording medium |
CN117827620B (en) * | 2024-03-05 | 2024-05-10 | 云账户技术(天津)有限公司 | Abnormality diagnosis method, training device, training equipment, and recording medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114844797A (en) | Call chain log and monitoring log association method and micro-service anomaly detection method | |
CN110245078B (en) | Software pressure testing method and device, storage medium and server | |
JP6706321B2 (en) | Method and device for service call information processing | |
Mayer et al. | An approach to extract the architecture of microservice-based software systems | |
CN112801666B (en) | Monitoring management method, system, medium and equipment based on enterprise service bus | |
US7984334B2 (en) | Call-stack pattern matching for problem resolution within software | |
US20080097801A1 (en) | Method And System For Monitoring Transaction Based System | |
CN113672456B (en) | Modularized self-monitoring method, system, terminal and storage medium of application platform | |
CN111722952A (en) | Fault analysis method, system, equipment and storage medium of business system | |
US20080168044A1 (en) | System and method for providing performance statistics for application components | |
CN110764980A (en) | Log processing method and device | |
CN111339175A (en) | Data processing method and device, electronic equipment and readable storage medium | |
US20210311918A1 (en) | Computer system diagnostic log chain | |
CN112699007A (en) | Method, system, network device and storage medium for monitoring machine performance | |
CN108665237B (en) | Method for establishing automatic inspection model and positioning abnormity based on business system | |
US7162390B2 (en) | Framework for collecting, storing, and analyzing system metrics | |
US8949669B1 (en) | Error detection, correction and triage of a storage array errors | |
CN114706827A (en) | Automatic generation method and device for transaction link topology | |
US10810073B2 (en) | Method and system for evaluation of a faulty behaviour of at least one event data generating machine and/or monitoring the regular operation of at least one event data generating machine | |
CN112416896A (en) | Data abnormity warning method and device, storage medium and electronic device | |
CN112087320A (en) | Abnormity positioning method and device, electronic equipment and readable storage medium | |
CN117194142A (en) | Integrated application performance diagnosis system and method based on link tracking | |
CN113572628A (en) | Data association method and device, computing equipment and computer storage medium | |
CN116431872B (en) | Observable system and service observing method based on observable system | |
CN114253846B (en) | Automatic test abnormality positioning method, device, equipment and 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 |