CN110069358A - Call chain trace analysis method, apparatus, electronic equipment and storage medium - Google Patents
Call chain trace analysis method, apparatus, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN110069358A CN110069358A CN201910312049.3A CN201910312049A CN110069358A CN 110069358 A CN110069358 A CN 110069358A CN 201910312049 A CN201910312049 A CN 201910312049A CN 110069358 A CN110069358 A CN 110069358A
- Authority
- CN
- China
- Prior art keywords
- tracking
- calling
- user
- application program
- request
- 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
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000004454 trace mineral analysis Methods 0.000 title claims abstract description 30
- 238000012544 monitoring process Methods 0.000 claims abstract description 46
- 230000004044 response Effects 0.000 claims abstract description 17
- 238000005070 sampling Methods 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 8
- 230000007613 environmental effect Effects 0.000 claims description 4
- 230000008569 process Effects 0.000 claims description 4
- 230000006835 compression Effects 0.000 claims description 3
- 238000007906 compression Methods 0.000 claims description 3
- 238000007405 data analysis Methods 0.000 claims description 3
- 238000002347 injection Methods 0.000 claims description 3
- 239000007924 injection Substances 0.000 claims description 3
- 238000004590 computer program Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 8
- 230000003287 optical effect Effects 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000005291 magnetic effect Effects 0.000 description 4
- 230000015556 catabolic process Effects 0.000 description 3
- 238000006731 degradation reaction Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000000243 solution Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000004083 survival effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0706—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
- G06F11/0709—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention discloses a kind of call chain trace analysis method, apparatus, electronic equipment and storage mediums, and wherein method includes: to request in response to different users, and monitoring service is respectively that each user requests to generate tracking ID;It is requested for any user, when the current thread for handling user request calls the tracking code for first passing through broker program injection in advance, the tracking data for the current thread that the tracking code is traced into is stored in the thread cache of the monitoring service by monitoring service;Wherein, the tracking data includes at least the calling ID of the tracking ID and current application program of user request, the calling ID of the current application program is generated by the monitoring service, for handling the current application program of user request under unique identification current thread.The embodiment of the present invention injects tracking code by broker program, reduces its dependence and code intrusion degree to business, and completely can track and identify entire call chain.
Description
Technical field
The present embodiments relate to Internet technical field more particularly to a kind of application call D-chain trace analysis sides
Method, device, electronic equipment and storage medium.
Background technique
With the prevalence of serviceization framework, service is split according to different dimensions, and primary request generally requires to be related to
To multiple services, to cope with the increasingly business of complexity and the application type sharply increased.Internet application building is different soft
On part module collection, these software modules, it may be possible to by different team's exploitations, different programming languages may be used Lai reality
It is existing, be also possible to be distributed in thousands of servers, across multiple and different data centers, these Distributed Applications each other according to
Rely, common cooperation is to complete all business scenarios.It can help to understand system action, for analytical therefore, it is necessary to some
The tool of energy problem, when to break down, quickly can position and solve the problems, such as, to be such as process optimization, frame
The O&Ms behavior such as structure optimization, program optimization and dilatation, current limliting, degradation provides the objective basis of science.
Currently, mostly use the higher mode of code coupling ratio to handle in application call D-chain trace analysis method,
It is that tracking script is inserted into according to by tracking rule in corresponding code based on each operation system of actual business requirement, with
Continue after an action of the bowels and the data traced into are analyzed.However, using the higher mode of code coupling ratio, there are certain deficiencies: code
Intrusion degree it is high, rely on specific business, development cost, maintenance cost are larger, and this mode is bigger to performance consumption.
Summary of the invention
The embodiment of the invention provides a kind of call chain trace analysis method, apparatus, electronic equipment and storage mediums, with solution
Certainly in the prior art call chain trace analysis when existing code intrusion degree it is high, rely on specific business, and performance consumption is big
The technical issues of.
In a first aspect, the embodiment of the invention provides a kind of call chain trace analysis methods, comprising:
It is requested in response to different users, monitoring service is respectively that each user requests to generate tracking ID;
For any user request, handle the user request current thread call in advance first pass through broker program injection with
When track code, the tracking data for the current thread that the tracking code is traced into is stored in the monitoring service by monitoring service
Thread cache in;
Wherein, the tracking data includes at least the calling ID of the tracking ID and current application program of user request, institute
The calling ID for stating current application program is generated by the monitoring service, for handling the user under unique identification current thread
The current application program of request.
Second aspect, the embodiment of the invention provides a kind of call chain trace analysis devices, comprising:
Request processing module, in response to different user's requests, monitoring service to be respectively that each user requests to generate
Track ID;
Tracking module, for requesting for any user, the current thread for handling user request is called first passes through generation in advance
When managing the tracking code of program injection, the tracking data that monitoring service tracks code to traced into current thread is stored in institute
It states in the thread cache of monitoring service;
Wherein, the tracking data includes at least the calling ID of the tracking ID and current application program of user request, institute
The calling ID for stating current application program is generated by the monitoring service, for handling the user under unique identification current thread
The current application program of request.
The third aspect, the embodiment of the invention also provides electronic equipment, the electronic equipment includes:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes the call chain trace analysis method as described in any embodiment of the present invention.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program realizes the call chain trace analysis method as described in any embodiment of the present invention when the program is executed by processor.
Call chain trace analysis method, apparatus, electronic equipment and storage medium provided in an embodiment of the present invention, pass through agency
Program injection tracking code, reduces the dependence and code intrusion degree to business, and any user is requested, asks handling this
When the current thread asked calls tracking code, monitoring service stores the tracking data of the current thread traced into, thus
Entire call chain completely can be tracked and identify, so as to the positioning of realization service fault and analysis of fast accurate.
Detailed description of the invention
Fig. 1 is a kind of flow diagram for call chain trace analysis method that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow diagram of call chain trace analysis method provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of structural schematic diagram for call chain trace analysis device that the embodiment of the present invention three provides;
Fig. 4 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention four provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of flow chart for call chain trace analysis method that the embodiment of the present invention one provides, and the present embodiment can fit
The case where positioning for service fault with analyzing, this method can be executed by call chain trace analysis device, and the device is configurable
On an electronic device, such as configuration is on server or terminal.
As shown in Figure 1, the call chain trace analysis method provided in the embodiment of the present invention may include:
S110, it is requested in response to different users, monitoring service is respectively that each user requests to generate tracking ID.
Operation system requests in response to different users when receiving multiple users request, is respectively by monitoring service
Each user requests to generate tracking ID, the unique identification that tracking ID is requested as a user, it may also be used for by call chain
Each calling associates, namely the application program with identical tracking ID forms a complete call chain.The embodiment of the present invention
In, illustratively, tracking ID is generated using the UUID for not including service language.
S120, it is requested for any user, the current thread for handling user request is called first passes through broker program note in advance
When the tracking code entered, the tracking data for the current thread that the tracking code is traced into is stored in the prison by monitoring service
In the thread cache for controlling service.
Wherein, broker program can be used for monitoring and assistance operate in JVM (Java Virtual independently of application program
Machine, Java Virtual Machine) on program, be also convenient for the definition of certain classes in user's substitutions and modifications program, for example, using
Bytecode technology Javassist and ASM modifies to the bytecode of runtime.Therefore, it is tracked using broker program
The injection of code, to realize the tracking of data.Wherein core tracking code is made lightly, can be injected into application program
In common frame and component, such as thread dispatching, control stream, request, the library RPC etc..Thus reduce the injection of monitoring service
To the dependence of specific business, and application code logic is not depended on.
For each user request received, respectively each user is needed to request to open a thread, to locate
Manage user request.It is requested for wherein any one user, when current thread handles user request, calls and first pass through generation in advance
The tracking code of program injection is managed, and after the tracking data of the tracking complete current thread of code acquisition, monitoring service will work as front
The tracking data of journey is stored in the thread cache of the monitoring service, such as is stored in the ThreadLocal of monitoring service.
Wherein, tracking data includes at least the calling ID of the tracking ID and current application program of user request, and current application program
Calling ID generated by monitoring service, for handled under unique identification current thread the user request current application journey
Sequence.Further, tracking data further includes calling time started, called side IP and port, calling time-consuming, call result, exception
Information, request header, request body, head response, response body, call stack information and environmental information, wherein environmental information includes host
Information and configuration information.
Further, it is requested for any user, current thread is handled in user's request process, is needed multiple using journey
Sequence is mutually called to handle user request, when current application program invocation target application program, detects the current application journey
Sequence passes through the tracking ID whether requested including the user in the message of the destination application;If so, generating unique mark
Know the calling ID of the destination application;If it is not, then generating the tracking ID of user request for the destination application, together
The calling ID of destination application described in Shi Shengcheng unique identification.By tracking ID and ID is called to determine complete call chain, with
And the call relation between each application program.
Specifically, in the present embodiment, since there are the calling between multiple application programs, it is therefore preferable that can use more
The mode of grade serial number calls ID to generate, such as the calling ID of current application program is 0.1, in current application program invocation target
When application program, be destination application generate calling ID can be 0.1.1.It is each to apply as a result, under same user request
The calling ID of program is also used to characterize the nest relation between the sequence of the calling between each application program and calling, subsequent based on tune
Nest relation with sequence and between calling generates network topology, clicks a certain node of network topology will pass through, can check this
The details of the tracking data of the corresponding application program of node, and then call chain is analyzed according to the details of tracking data.
In the embodiment of the present invention, tracking code is injected by broker program, reduces and the dependence and code of business is invaded
Degree, and any user is requested, when the current thread for handling the request calls tracking code, monitoring service will be traced into
The tracking data of current thread is stored, thus, it is possible to completely track and identify entire call chain, so as to fast accurate
Realize service fault positioning and analysis.
Embodiment two
Fig. 2 is a kind of flow diagram of call chain trace analysis method provided by Embodiment 2 of the present invention.The present embodiment
It is optimized based on above-described embodiment, as shown in Fig. 2, the call chain trace analysis method provided in the embodiment of the present invention can
To include:
S210, it is requested in response to different users, monitoring service is respectively that each user requests to generate tracking ID.
S220, it is requested for any user, the current thread for handling user request is called first passes through broker program note in advance
When the tracking code entered, the tracking data for the current thread that the tracking code is traced into is stored in the prison by monitoring service
In the thread cache for controlling service.
S230, recognition and tracking data, and acquisition meets the regular tracking data of default sampling and uploads to data center, makes institute
Data center is stated to classify to the tracking data according to tracking ID and carry out data analysis.
It is not to be sampled using a unified sampling plan, but utilize adaptive sampling in the present embodiment
Rate is sampled, specifically, identifying the tracking data sampled in the unit time with a sampling expectation rate.So it can guarantee
Automatically sample rate is improved when low discharge low-load, and can reduce sample rate in the case where high flow capacity high load, so that making
Loss is always maintained in control.And in specific sampling, identify the tracking number stored in the thread cache of monitoring service
According to, and acquisition meets the regular tracking data of default sampling and uploads to data center.Illustratively, it can be acquired based on sampling instance
Corresponding tracking data, such as only acquisition calls exception information or calls the correlation of the time-consuming application program for being greater than time threshold
Information.It for the tracking data of acquisition, can be summarized by related algorithm, such as be converged in such a way that weighting is averaged
Always, the data volume of sampling can thus be further decreased.Further, it can also be carried out to the default rule tracking data that samples is met
Compression processing, and compressed tracking data is periodically uploaded into data center.So that the storage resource and flow of consumption
Also all very small, even applying on a large scale, do not need very big bandwidth yet.Data center is receiving upload data
Afterwards, classified according to tracking ID to tracking data, the tracking data Macro or mass analysis of the same call chain will be belonged to, it can quickly really
Surely location of fault is requested, to be handled.
Further, since sampling can affect business, the shadow can be eliminated by the means of system degradation
It rings.Illustratively, the configuration mode based on various dimensions such as application, application packet, application server IP degrades, wherein each
Both provide that " whether opening link trace ", " link sample rate ", " whether opening TP tracking ", " TP granularity " etc. are matched in dimension
Item is set, scale service system demand had so both been met, while also reducing performance loss as far as possible and avoiding to application program
It influences.
In the embodiment of the present invention, after realization is completely tracked and identified to the corresponding call chain of each request, lead to
It crosses adaptive sample rate acquisition to meet the tracking data of preset rules and upload to data center, performance loss can be reduced.May be used also
By degradation means abundant, reduces because sampling the service impact just come, guarantee that business is smooth.
Embodiment three
Fig. 3 is a kind of structural schematic diagram for call chain trace analysis device that the embodiment of the present invention three provides.Such as Fig. 3 institute
Show, which includes:
Request processing module 310, in response to different user's requests, monitoring service to be respectively that each user please seek survival
At tracking ID;
Tracking module 320, for requesting for any user, the current thread calling for handling user request first passes through in advance
When the tracking code of broker program injection, the tracking data that monitoring service tracks code to traced into current thread is stored in
In the thread cache of the monitoring service;
Wherein, the tracking data includes at least the calling ID of the tracking ID and current application program of user request, institute
The calling ID for stating current application program is generated by the monitoring service, for handling the user under unique identification current thread
The current application program of request.
In the embodiment of the present invention, tracking code is injected by broker program, reduces and the dependence and code of business is invaded
Degree, and any user is requested, when the current thread for handling the request calls tracking code, monitoring service will be traced into
The tracking data of current thread is stored, thus, it is possible to completely track and identify entire call chain, so as to fast accurate
Realize service fault positioning and analysis.
On the basis of the above embodiments, described device further include:
Judgment module is detected, for requesting for any user, current thread is handled in user's request process, currently answered
When with routine call destination application, detecting the current application program and passing through in the message of the destination application is
The no tracking ID including user request;
Identifier generation module, for if the determination result is YES, then generating the calling of destination application described in unique identification
ID;If it is not, then generating the tracking ID of user request for the destination application, while generating target described in unique identification and answering
With the calling ID of program.
On the basis of the above embodiments, the tracking data further includes calling time started, called side IP and port, tune
With time-consuming, call result, exception information, request header, request body, head response, response body, call stack information and environmental information.
On the basis of the above embodiments, under same user's request, the calling ID of each application program is also used to characterize and respectively answer
Nest relation with the calling sequence between program threads and between calling, so as to based on the calling sequence and the nested pass between calling
System generates network topology.
On the basis of the above embodiments, described device further include:
Acquisition module, tracking data for identification, and acquire and meet the tracking data of default sampling rule and upload to data
Center makes the data center be classified according to tracking ID to the tracking data and carries out data analysis.
On the basis of the above embodiments, the acquisition module is specifically used for:
To meet it is default sample regular tracking data and carry out compression processing, and by compressed tracking data it is periodic on
Pass to data center.
Call chain trace analysis device provided by the embodiment of the present invention can be performed provided by any embodiment of the invention
Call chain trace analysis method is deposited, has the corresponding functional module of execution method and beneficial effect.
Example IV
Fig. 4 is the structural schematic diagram for the electronic equipment that the embodiment of the present invention four provides, which is configured with business side
Access platform.Fig. 4 shows the block diagram for being suitable for the example electronic device 12 for being used to realize embodiment of the present invention.Fig. 4 is shown
Electronic equipment 12 be only an example, should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in figure 4, electronic equipment 12 is showed in the form of universal computing device.The component of electronic equipment 12 may include
But be not limited to: one or more processor or processor 16, memory 28 connect different system components (including memory
28 and processor 16) bus 18.
Bus 18 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts
For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC)
Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Electronic equipment 12 typically comprises a variety of computer system readable media.These media can be it is any can be electric
The usable medium that sub- equipment 12 accesses, including volatile and non-volatile media, moveable and immovable medium.
Memory 28 may include the computer system readable media of form of volatile memory, such as random access memory
Device (RAM) 30 and/or cache memory 32.Electronic equipment 12 may further include it is other it is removable/nonremovable,
Volatile/non-volatile computer system storage medium.Only as an example, storage system 34 can be used for reading and writing irremovable
, non-volatile magnetic media (Fig. 4 do not show, commonly referred to as " hard disk drive ").Although not shown in fig 4, use can be provided
In the disc driver read and write to removable non-volatile magnetic disk (such as " floppy disk "), and to removable anonvolatile optical disk
The CD drive of (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driver can
To be connected by one or more data media interfaces with bus 18.Memory 28 may include at least one program product,
The program product has one group of (for example, at least one) program module, these program modules are configured to perform each implementation of the invention
The function of example.
Program/utility 40 with one group of (at least one) program module 42 can store in such as memory 28
In, such program module 42 include but is not limited to operating system, one or more application program, other program modules and
It may include the realization of network environment in program data, each of these examples or certain combination.Program module 42 is usual
Execute the function and/or method in embodiment described in the invention.
Electronic equipment 12 can also be with one or more external equipments 14 (such as keyboard, sensing equipment, display 24 etc.)
Communication, can also be enabled a user to one or more equipment interact with the electronic equipment 12 communicate, and/or with make the electricity
Any equipment (such as network interface card, modem etc.) that sub- equipment 12 can be communicated with one or more of the other calculating equipment
Communication.This communication can be carried out by input/output (I/O) interface 22.Also, electronic equipment 12 can also be suitable by network
Orchestration 20 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet)
Communication.As shown, network adapter 20 is communicated by bus 18 with other modules of electronic equipment 12.Although should be understood that
It is not shown in the figure, other hardware and/or software module can be used in conjunction with electronic equipment 12, including but not limited to: microcode is set
Standby driver, redundant processing unit, external disk drive array, RAID system, tape drive and data backup storage system
System etc..
The program that processor 16 is stored in memory 28 by operation, at various function application and data
Reason, such as realize call chain trace analysis method provided by the embodiment of the present invention, this method comprises:
It is requested in response to different users, monitoring service is respectively that each user requests to generate tracking ID;
For any user request, handle the user request current thread call in advance first pass through broker program injection with
When track code, the tracking data for the current thread that the tracking code is traced into is stored in the monitoring service by monitoring service
Thread cache in;
Wherein, the tracking data includes at least the calling ID of the tracking ID and current application program of user request, institute
The calling ID for stating current application program is generated by the monitoring service, for handling the user under unique identification current thread
The current application program of request.
Embodiment five
A kind of storage medium comprising computer executable instructions is provided in the embodiment of the present invention, the computer is executable
Instruction is used to execute call chain trace analysis method when being executed by computer processor, this method comprises:
It is requested in response to different users, monitoring service is respectively that each user requests to generate tracking ID;
For any user request, handle the user request current thread call in advance first pass through broker program injection with
When track code, the tracking data for the current thread that the tracking code is traced into is stored in the monitoring service by monitoring service
Thread cache in;
Wherein, the tracking data includes at least the calling ID of the tracking ID and current application program of user request, institute
The calling ID for stating current application program is generated by the monitoring service, for handling the user under unique identification current thread
The current application program of request.Certainly, a kind of storage comprising computer executable instructions provided in the embodiment of the present invention
Medium, the method operation that computer executable instructions are not limited to the described above, can also be performed in any embodiment of that present invention
Relevant operation in provided call chain trace analysis method.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media
Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable
Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or
Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool
There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires
(ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-
ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage
Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device
Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
It further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with
It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion
Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.?
Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or
Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service
It is connected for quotient by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.
Claims (10)
1. a kind of call chain trace analysis method characterized by comprising
It is requested in response to different users, monitoring service is respectively that each user requests to generate tracking ID;
It is requested for any user, the current thread for handling user request calls the tracking generation for first passing through broker program injection in advance
When code, the tracking data for the current thread that the tracking code is traced into is stored in the line of the monitoring service by monitoring service
In journey caching;
Wherein, the tracking data includes at least the tracking ID of user request and the calling ID of current application program, described to work as
The calling ID of preceding application program is generated by the monitoring service, for handling user request under unique identification current thread
Current application program.
2. the method according to claim 1, wherein the method also includes:
It is requested for any user, current thread is handled in user's request process, current application program invocation target application journey
When sequence, detect the current application program pass through in the message of the destination application whether include user request with
Track ID;
If so, generating the calling ID of destination application described in unique identification;If it is not, then being generated for the destination application
The tracking ID of user request, while generating the calling ID of destination application described in unique identification.
3. the method according to claim 1, wherein the tracking data further includes calling the time started, calling
Time-consuming, call result, exception information, request header, request body, head response, response body, call stack information are called in square IP and port
And environmental information.
4. method according to claim 1 or 2, which is characterized in that under same user's request, the calling ID of each application program
Nest relation between being also used to characterize calling sequence between each application program threads and calling, so as to based on calling sequence and
Nest relation between calling generates network topology.
5. the method according to claim 1, wherein the method also includes:
Recognition and tracking data, and acquisition meets the regular tracking data of default sampling and uploads to data center, makes in the data
The heart classifies to the tracking data according to tracking ID and carries out data analysis.
6. according to the method described in claim 5, it is characterized in that, the tracking data that acquisition meets default sampling rule uploads to
Data center includes:
Compression processing is carried out to the default rule tracking data that samples is met, and compressed tracking data is periodically uploaded to
Data center.
7. a kind of call chain trace analysis device, which is characterized in that described device includes:
Request processing module, in response to different user's requests, monitoring service to be respectively that each user requests to generate tracking
ID;
Tracking module, for requesting for any user, the current thread for handling user request, which is called to first pass through in advance, acts on behalf of journey
When the tracking code of sequence injection, the tracking data that monitoring service tracks code to traced into current thread is stored in the prison
In the thread cache for controlling service;
Wherein, the tracking data includes at least the tracking ID of user request and the calling ID of current application program, described to work as
The calling ID of preceding application program is generated by the monitoring service, for handling user request under unique identification current thread
Current application program.
8. device according to claim 7, which is characterized in that described device further include:
Judgment module is detected, for requesting for any user, current thread is handled in user's request process, current application journey
When sequence invocation target application program, detects the current application program and pass through in the message of the destination application and whether wrap
Include the tracking ID of user request;
Identifier generation module, for if the determination result is YES, then generating the calling ID of destination application described in unique identification;If
It is no, then the tracking ID of user request is generated for the destination application, while generating target application journey described in unique identification
The calling ID of sequence.
9. a kind of electronic equipment, which is characterized in that the electronic equipment further include:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
Now such as call chain trace analysis method as claimed in any one of claims 1 to 6.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
Such as call chain trace analysis method as claimed in any one of claims 1 to 6 is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910312049.3A CN110069358A (en) | 2019-04-18 | 2019-04-18 | Call chain trace analysis method, apparatus, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910312049.3A CN110069358A (en) | 2019-04-18 | 2019-04-18 | Call chain trace analysis method, apparatus, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110069358A true CN110069358A (en) | 2019-07-30 |
Family
ID=67368006
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910312049.3A Pending CN110069358A (en) | 2019-04-18 | 2019-04-18 | Call chain trace analysis method, apparatus, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110069358A (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110647447A (en) * | 2019-08-01 | 2020-01-03 | 百度时代网络技术(北京)有限公司 | Abnormal instance detection method, apparatus, device and medium for distributed system |
CN110806931A (en) * | 2019-10-31 | 2020-02-18 | 上海依图网络科技有限公司 | Method and device for realizing call link tracking of distributed service and electronic equipment |
CN111913789A (en) * | 2020-06-29 | 2020-11-10 | 浪潮通用软件有限公司 | Program tracking method, device and medium supporting micro-service architecture |
CN112613818A (en) * | 2020-12-24 | 2021-04-06 | 深圳大学 | Tracking method, device, equipment and storage medium of prefabricated part |
CN112631891A (en) * | 2021-01-05 | 2021-04-09 | 网易(杭州)网络有限公司 | Performance analysis method and device, electronic equipment and storage medium |
CN113064790A (en) * | 2021-03-15 | 2021-07-02 | 上海浦东发展银行股份有限公司 | Call chain data acquisition system and method based on configuration center and storage medium |
CN113377614A (en) * | 2021-06-08 | 2021-09-10 | 北京百度网讯科技有限公司 | Generation method and device of call chain information, electronic equipment and storage medium |
CN113760696A (en) * | 2020-07-01 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Program problem positioning method and device, electronic equipment and storage medium |
CN114398179A (en) * | 2022-01-14 | 2022-04-26 | 北京思明启创科技有限公司 | Method and device for acquiring tracking identifier, server and storage medium |
CN116016262A (en) * | 2022-12-28 | 2023-04-25 | 天翼云科技有限公司 | Method and device for detecting call chain consistency in real time based on union |
CN116346473A (en) * | 2023-03-29 | 2023-06-27 | 贝壳找房(北京)科技有限公司 | Calling link identification method, equipment, storage medium and computer program product |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101339535A (en) * | 2008-08-21 | 2009-01-07 | 金蝶软件(中国)有限公司 | Method and device for monitoring application program performance |
CN104636259A (en) * | 2015-03-18 | 2015-05-20 | 厦门雅迅网络股份有限公司 | Function execution timeout and deadlock detection method based on dynamic tracking of operating period |
CN106326017A (en) * | 2016-08-17 | 2017-01-11 | 广东亿迅科技有限公司 | Realization system for call chain based on Annotation application |
CN106487596A (en) * | 2016-10-26 | 2017-03-08 | 宜人恒业科技发展(北京)有限公司 | Distributed Services follow the tracks of implementation method |
CN108038145A (en) * | 2017-11-23 | 2018-05-15 | 携程旅游网络技术(上海)有限公司 | Distributed Services tracking, system, storage medium and electronic equipment |
-
2019
- 2019-04-18 CN CN201910312049.3A patent/CN110069358A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101339535A (en) * | 2008-08-21 | 2009-01-07 | 金蝶软件(中国)有限公司 | Method and device for monitoring application program performance |
CN104636259A (en) * | 2015-03-18 | 2015-05-20 | 厦门雅迅网络股份有限公司 | Function execution timeout and deadlock detection method based on dynamic tracking of operating period |
CN106326017A (en) * | 2016-08-17 | 2017-01-11 | 广东亿迅科技有限公司 | Realization system for call chain based on Annotation application |
CN106487596A (en) * | 2016-10-26 | 2017-03-08 | 宜人恒业科技发展(北京)有限公司 | Distributed Services follow the tracks of implementation method |
CN108038145A (en) * | 2017-11-23 | 2018-05-15 | 携程旅游网络技术(上海)有限公司 | Distributed Services tracking, system, storage medium and electronic equipment |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110647447A (en) * | 2019-08-01 | 2020-01-03 | 百度时代网络技术(北京)有限公司 | Abnormal instance detection method, apparatus, device and medium for distributed system |
CN110647447B (en) * | 2019-08-01 | 2023-04-14 | 百度时代网络技术(北京)有限公司 | Abnormal instance detection method, device, equipment and medium for distributed system |
CN110806931A (en) * | 2019-10-31 | 2020-02-18 | 上海依图网络科技有限公司 | Method and device for realizing call link tracking of distributed service and electronic equipment |
CN111913789A (en) * | 2020-06-29 | 2020-11-10 | 浪潮通用软件有限公司 | Program tracking method, device and medium supporting micro-service architecture |
CN113760696A (en) * | 2020-07-01 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Program problem positioning method and device, electronic equipment and storage medium |
CN112613818A (en) * | 2020-12-24 | 2021-04-06 | 深圳大学 | Tracking method, device, equipment and storage medium of prefabricated part |
CN112631891A (en) * | 2021-01-05 | 2021-04-09 | 网易(杭州)网络有限公司 | Performance analysis method and device, electronic equipment and storage medium |
CN113064790A (en) * | 2021-03-15 | 2021-07-02 | 上海浦东发展银行股份有限公司 | Call chain data acquisition system and method based on configuration center and storage medium |
CN113064790B (en) * | 2021-03-15 | 2023-08-11 | 上海浦东发展银行股份有限公司 | Call chain data acquisition system, method and storage medium based on configuration center |
CN113377614B (en) * | 2021-06-08 | 2023-07-25 | 北京百度网讯科技有限公司 | Call chain information generation method and device, electronic equipment and storage medium |
CN113377614A (en) * | 2021-06-08 | 2021-09-10 | 北京百度网讯科技有限公司 | Generation method and device of call chain information, electronic equipment and storage medium |
CN114398179A (en) * | 2022-01-14 | 2022-04-26 | 北京思明启创科技有限公司 | Method and device for acquiring tracking identifier, server and storage medium |
CN114398179B (en) * | 2022-01-14 | 2023-03-14 | 北京思明启创科技有限公司 | Method and device for acquiring tracking identifier, server and storage medium |
CN116016262A (en) * | 2022-12-28 | 2023-04-25 | 天翼云科技有限公司 | Method and device for detecting call chain consistency in real time based on union |
CN116016262B (en) * | 2022-12-28 | 2024-05-24 | 天翼云科技有限公司 | Method and device for detecting call chain consistency in real time based on union |
CN116346473A (en) * | 2023-03-29 | 2023-06-27 | 贝壳找房(北京)科技有限公司 | Calling link identification method, equipment, storage medium and computer program product |
CN116346473B (en) * | 2023-03-29 | 2024-03-26 | 贝壳找房(北京)科技有限公司 | Calling link identification method, equipment, storage medium and computer program product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110069358A (en) | Call chain trace analysis method, apparatus, electronic equipment and storage medium | |
US10169211B2 (en) | Application programming interface testing services | |
CN110297689B (en) | Intelligent contract execution method, device, equipment and medium | |
WO2021259013A1 (en) | Data processing method and apparatus, electronic device, and computer-readable medium | |
CN108833131A (en) | System, method, equipment and the computer storage medium of distributed data base cloud service | |
CN111737127A (en) | Method and apparatus for testing map service | |
CN110457277A (en) | Service process performance analysis method, device, equipment and storage medium | |
CN111563014A (en) | Interface service performance test method, device, equipment and storage medium | |
CN111343262B (en) | Distributed cluster login method, device, equipment and storage medium | |
CN114398179B (en) | Method and device for acquiring tracking identifier, server and storage medium | |
CN111324441A (en) | Operating environment switching method and device, computer equipment and storage medium | |
CN114253864A (en) | Service testing method and device, electronic equipment and storage medium | |
CN111737022A (en) | Interface calling method, system, equipment and medium based on micro-service | |
CN112346794A (en) | Interface calling method, device, equipment and medium | |
CN113076253A (en) | Test method and test device | |
CN113127356A (en) | Pressure measurement method and device, electronic equipment and storage medium | |
CN111966653A (en) | Data processing method, device, server and storage medium for micro-service call link | |
US7716531B2 (en) | System and method for fault mapping of exceptions across programming models | |
US8732323B2 (en) | Recording medium storing transaction model generation support program, transaction model generation support computer, and transaction model generation support method | |
CN112235262A (en) | Message analysis method and device, electronic equipment and computer readable storage medium | |
CN113760562A (en) | Link tracking method, device, system, server and storage medium | |
CN108399128A (en) | A kind of generation method of user data, device, server and storage medium | |
CN115022201B (en) | Data processing function test method, device, equipment and storage medium | |
CN116974874A (en) | Database testing method and device, electronic equipment and readable storage medium | |
CN111913861A (en) | Performance test method, device, equipment and medium of Internet of things system |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190730 |
|
RJ01 | Rejection of invention patent application after publication |