Proxy service call chain monitoring method and device, electronic equipment and storage medium

CN119383218APending Publication Date: 2025-01-28E SURFING IOT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411260180.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

In microservice architecture and large-scale distributed systems, reverse proxy services do not support fine-grained performance monitoring and call chain tracking, making it difficult to achieve performance tuning and troubleshooting of communication links.

Method used

In the management software of reverse proxy services, embedded the newspaper plug -in, and use these plug -in to generate target messages in the log to determine the call chain of the reverse proxy service. Specific steps include packet plug -ins in the LUA script language embedded in Nginx components, generate AGentinfo packets and SPAN packets, and obtain and extract these packets from reverse agency services through logstash and Kafka to determine the call chain.

Benefits of technology

Through the embedded message plug -in, the log of the reverse proxy service can be obtained without invading, reducing the workload of the management software, improving the efficiency, and determining the calling chain of the reverse proxy service, making up for the existing technology Call the defect of the chain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383218A_ABST
    Figure CN119383218A_ABST
Patent Text Reader

Abstract

The invention discloses a proxy service call chain monitoring method and device, electronic equipment and a storage medium, and relates to the technical field of computers, and the method comprises the following steps: embedding a message plug-in in management software of reverse proxy service; generating a target message in the log of the reverse proxy service by using the message plug-in; acquiring a log from the reverse proxy service; and determining a call chain of the reverse proxy service according to the target message in the log. By embedding the message plug-in in the management software of the reverse proxy service, the log of the reverse proxy service can be obtained in a non-intrusive form, the workload of changing the management software is reduced, the efficiency is improved, and the call chain of the reverse proxy service can be determined according to the log, so that the user experience is improved. The defect that the call chain of the reverse proxy service in the proxy forwarding process cannot be determined in the prior art is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for monitoring a proxy service call chain. Background Art

[0002] Reverse proxy services are required in microservice architectures and large-scale distributed systems. However, the reverse proxy services of related technologies do not directly support fine-grained performance monitoring and call chain tracing. When services forward messages through reverse proxy services, the call chain of proxy forwarding cannot be determined, making it difficult to efficiently optimize the performance of communication links and troubleshoot problems. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a proxy service call chain monitoring method, device, electronic device and storage medium to determine the call chain of a reverse proxy service.

[0004] To achieve the above purpose, an embodiment of the present application provides a proxy service call chain monitoring method, the method comprising the following steps:

[0005] Embed a message plug-in in the management software of the reverse proxy service;

[0006] Using the message plug-in to generate a target message in the log of the reverse proxy service;

[0007] Obtain the log from the reverse proxy service;

[0008] Determine the call chain of the reverse proxy service according to the target message in the log.

[0009] In some embodiments, embedding the message plug-in in the management software of the reverse proxy service includes the following steps:

[0010] The message plug-in written in lua scripting language is embedded in the nginx component; wherein the nginx component is the management software of the reverse proxy service.

[0011] In some embodiments, embedding the message plug-in written in the lua scripting language in the nginx component includes the following steps:

[0012] Using the lua scripting language to write an agentInfo message plug-in for obtaining the agentInfo message, and adding the agentInfo message plug-in to the configuration file in the nginx component;

[0013] A span message plug-in for obtaining span messages is written using the lua scripting language, and the span message plug-in is added to the configuration file in the nginx component.

[0014] In some embodiments, the use of the Lua scripting language to write a span message plug-in for obtaining a span message includes the following steps:

[0015] A first plug-in for obtaining span messages is written in Lua scripting language; wherein the first plug-in is used to generate first proxy data of the nginx component in response to a request of the nginx component, obtain a first span message from the first proxy data, and transmit the first span message to a downstream service through a request link;

[0016] A second plug-in for obtaining span messages is written in Lua scripting language; wherein the second plug-in is used to receive a request from an upstream service, forward the request from the upstream service to a corresponding downstream service, generate second proxy data, obtain a second span message from the second proxy data, and pass the second span message to the downstream service through a request link.

[0017] In some embodiments, obtaining the log from the reverse proxy service comprises the following steps:

[0018] The log is obtained from the reverse proxy service using logstash software.

[0019] In some embodiments, determining the call chain of the reverse proxy service according to the target message in the log includes the following steps:

[0020] The target message is extracted from the log using kafka software, and the call chain of the reverse proxy service is determined according to the extracted target message.

[0021] In some embodiments, the method further comprises the following steps:

[0022] Output the call chain of the reverse proxy service through a visual interface;

[0023] The faulty node in the call chain of the reverse proxy service is marked on the visual interface.

[0024] To achieve the above purpose, another aspect of the embodiment of the present application provides a proxy service call chain monitoring device, the device comprising:

[0025] A plug-in embedding unit, used to embed a message plug-in in the management software of the reverse proxy service;

[0026] A message generating unit, configured to generate a target message in the log of the reverse proxy service by using the message plug-in;

[0027] A log acquisition unit, used to acquire the log from the reverse proxy service;

[0028] A call chain determination unit is used to determine the call chain of the reverse proxy service according to the target message in the log.

[0029] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned proxy service call chain monitoring method when executing the computer program.

[0030] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned proxy service call chain monitoring method is implemented.

[0031] The embodiments of the present application include at least the following beneficial effects:

[0032] The present application can embed a message plug-in in the management software of the reverse proxy service; use the message plug-in to generate a target message in the log of the reverse proxy service; obtain the log from the reverse proxy service; and determine the call chain of the reverse proxy service based on the target message in the log. By embedding the message plug-in in the management software of the reverse proxy service, the log of the reverse proxy service can be obtained in a non-invasive manner, which reduces the workload of modifying the management software and improves efficiency. In addition, the call chain of the reverse proxy service can be determined based on the log, which makes up for the defect that the related technology cannot determine the call chain of the reverse proxy service during the proxy forwarding process. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0034] Figure 1 A flowchart of a proxy service call chain monitoring method provided in an embodiment of the present application;

[0035] Figure 2 An example flow chart of a proxy service call chain monitoring method provided in an embodiment of the present application;

[0036] Figure 3A schematic diagram of the structure of a proxy service call chain monitoring device provided in an embodiment of the present application;

[0037] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0039] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0040] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0042] Before describing the embodiments of the present application in detail, some terms and related technologies involved in the embodiments of the present application are first described. The terms and related technologies involved in the embodiments of the present application are subject to the following explanations:

[0043] Pinpoint is a tool focused on distributed application performance monitoring, designed to help developers quickly identify and resolve performance bottlenecks. Pinpoint provides real-time monitoring and tracking capabilities, helping developers accurately locate performance issues by collecting and analyzing application operation data. Pinpoint supports multiple programming languages ​​and application frameworks, such as Java, Spring, Node.js, etc., and can be widely used in various distributed systems.

[0044] Lua is a scripting language that is very easy to embed into other languages. The official version of the Lua language only includes a streamlined core and the most basic library, which makes Lua small in size and fast in startup, making it suitable for embedding into other programs.

[0045] The agentInfo message is a data message generated by the Agent software during operation. The agentInfo message contains detailed information about the Agent and the host or container it monitors, including but not limited to the host name, IP address, port, agentId, applicationName, serviceType, pid, agentVersion, etc. The above information is reported through data interaction between the Agent and the cloud protection center to achieve security detection and protection of the host. In more specific scenarios, such as in the APM (application performance management) monitoring system of pinpoint, the agentInfo message also includes information such as service type, which is crucial for the normal operation and performance analysis of the monitoring system. For example, when starting a springboot project with pinpoint mounted, the icon and service type displayed on the interface can be determined by the service type information in the agentInfo message. The agentInfo message not only contains basic system information, but also involves the identification and display of service types. The information contained in the agentInfo message is very critical for understanding and analyzing the operating status of the system.

[0046] Span messages can be used for a type of network monitoring. Through span messages, administrators can copy the data flow on the switch to a specific monitoring port for network traffic analysis, troubleshooting, and security monitoring. Span messages can be used to capture network traffic for analysis, and message analysis involves detailed inspection and interpretation of captured network data packets. Span messages are data units exchanged and transmitted in the network, that is, a block of data to be sent by a station at one time, containing the complete data information to be sent. During the transmission process, messages are continuously encapsulated into groups, packets, and frames for transmission. The encapsulation method is to add information segments, that is, data organized in a certain format by the message header. Messages are units of network transmission, and their lengths vary, and their lengths are unlimited and variable. Through span messages, administrators can choose to copy the traffic of one or more source ports and send the traffic to one or more target ports. The target ports can be connected to devices used for network analysis, such as packet capture tools or network analyzers, to achieve monitoring and analysis of network traffic.

[0047] Logstash is a log processing tool that can be used to collect, transform, and store log data.

[0048] Kafka is a distributed streaming data platform that can be used to process and manage real-time streaming data. Kafka has the characteristics of high scalability, high availability, and persistence, so it has a wide range of uses in various different application scenarios. The following are example uses and example usage scenarios of Kafka: Log and event data integration: Kafka can be used to integrate log and event data from various applications, systems, and devices into a central location for subsequent processing and analysis.

[0049] In microservice architecture and large-scale distributed systems, servers (HTTP and reverse proxy web servers) deployed with nginx components are commonly used as reverse proxy services and load balancers. However, traditional servers deployed with nginx components do not directly support fine-grained performance monitoring and link tracking, which makes server performance tuning and troubleshooting more difficult. Currently, the pinpoint plug-in does not have a tracking plug-in for the nginx component. When various services are forwarded through the nginx component, the upstream and downstream call chains cannot be determined. Therefore, it has become an important technical requirement to extend the monitoring capabilities of pinpoint to the nginx component to achieve real-time monitoring and link tracking of the performance of the nginx component.

[0050] The embodiments of the present application provide a method, device, electronic device and storage medium for monitoring the call chain of a proxy service. The technical solution of the present application includes: embedding a message plug-in in the management software of the reverse proxy service; using the message plug-in to generate a target message in the log of the reverse proxy service; obtaining the log from the reverse proxy service; and determining the call chain of the reverse proxy service based on the target message in the log. By embedding the message plug-in in the management software of the reverse proxy service, the log of the reverse proxy service can be obtained in a non-invasive manner, which reduces the workload of modifying the management software and improves efficiency. In addition, the call chain of the reverse proxy service can be determined based on the log, which makes up for the defect that the related technology cannot determine the call chain of the reverse proxy service during the proxy forwarding process.

[0051] The embodiment of the present application provides a method for monitoring a proxy service call chain, and relates to the field of computer technology. The method for monitoring a proxy service call chain provided in the embodiment of the present application can be applied to a terminal, can be applied to a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the proxy service call chain monitoring method, etc., but is not limited to the above forms.

[0052] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0053] Reference Figure 1The embodiment of the present application provides a proxy service call chain monitoring method, which may include but is not limited to S100 to S130, as follows:

[0054] S100: embed a message plug-in in the management software of the reverse proxy service.

[0055] It is understandable that the management software of the reverse proxy service can manage, analyze and configure the data of the reverse proxy service, wherein the data of the reverse proxy service includes the data generated by itself and the data received from the upstream and downstream services.

[0056] The message plug-in can be used to generate target messages in the log of the reverse proxy service.

[0057] Furthermore, S100 may include:

[0058] The message plug-in written in lua scripting language is embedded in the nginx component; wherein the nginx component is the management software of the reverse proxy service.

[0059] Furthermore, this embodiment may include:

[0060] Using the lua scripting language to write an agentInfo message plug-in for obtaining the agentInfo message, and adding the agentInfo message plug-in to the configuration file in the nginx component;

[0061] A span message plug-in for obtaining span messages is written using the lua scripting language, and the span message plug-in is added to the configuration file in the nginx component.

[0062] Specifically, the agentInfo message plug-in and span message plug-in of this embodiment can be embedded in the configuration file of the nginx component in a non-invasive manner. When the nginx component runs again, the agentInfo message plug-in and span message plug-in can be executed to generate corresponding messages.

[0063] Considering that the reverse proxy service can generate data that is forwarded by its own proxy and receive data that is forwarded by the upstream service, when writing the span message plug-in, corresponding plug-ins can be written for the above two situations respectively.

[0064] Specifically, using the Lua scripting language to write a span message plug-in for obtaining span messages can further include the following steps:

[0065] A first plug-in for obtaining span messages is written in Lua scripting language; wherein the first plug-in is used to generate first proxy data of the nginx component in response to a request of the nginx component, obtain a first span message from the first proxy data, and transmit the first span message to a downstream service through a request link;

[0066] A second plug-in for obtaining span messages is written in Lua scripting language; wherein the second plug-in is used to receive a request from an upstream service, forward the request from the upstream service to a corresponding downstream service, generate second proxy data, obtain a second span message from the second proxy data, and pass the second span message to the downstream service through a request link.

[0067] The span message plug-in of this embodiment may include a first plug-in and a second plug-in, which respectively process the data forwarded by the reverse proxy service itself and the data received from the upstream service and then forwarded by the proxy.

[0068] S110: Generate a target message in the log of the reverse proxy service using the message plug-in.

[0069] It is understandable that the message plug-in can be executed when the nginx component is running, and then the message plug-in generates a target message in the log of the reverse proxy service according to the preset logic.

[0070] Exemplarily, the target message may include an agentInfo message and a span message.

[0071] The agentInfo message may include: agentId (configurable name), version (fixed to 0), startTimestamp (agent start time), eventTimestamp (agent message sending time), eventIdentifier (fixed to 4294972408), agentLifeCycleState (filled in according to the status of the service, mainly divided into STARTING, RUNNING, SHUTDOWN), hostName (host IP address).

[0072] If the upstream service has no data (that is, processing the data forwarded by the reverse proxy service itself), the span message can include: self-generated spanID (generation rules must ensure uniqueness), traceID (generation rules must ensure uniqueness), pinpointHost (the ip and port of this service), and the pinpoint-Host injected into the next http header pinpointHost passed to the proxy forwarding, the pinpoint-pspanID injection value is empty, the pinpoint-TraceID injects traceID, the Pinpoint-spanID injects spanID, the pinpoint-pAppName injection is the name of the service (customizable), the Pinpoint-Flags injection value is 0 (fixed value), and the pinpoint-pAppType injection is 1000 (nginx type code).

[0073] If the upstream service has data (i.e. the reverse proxy service receives data sent by the upstream service and then forwards the data through the proxy), the span message may include: receiving the request sent by the upstream, and obtaining the information of pinpoint-Host, pinpoint-pspanID, pinpoint-traceID, and pinpoint-spanID from the header. In the proxy forwarding, the pinpoint-Host (the ip and port of this service) is injected into the next http header pinpoint-Host, the pinpoint-pspanID injection value is the value of the upstream header pinpoint-spanID, the pinpoint-traceID is injected into the upstream header pinpoint-traceID, the pinpoint-spanID is injected into the self-generated spanID (the generation rule must be guaranteed to be unique), the pinpoint-pAppName is injected into the name of the service (customizable), the pinpoint-Flags injection value is 0 (fixed value), and the pinpoint-pAppType injection value is 1000 (nginx type code).

[0074] S120: Obtain the log from the reverse proxy service.

[0075] Specifically, this embodiment can obtain the log recorded by the reverse proxy service.

[0076] S130: Determine the call chain of the reverse proxy service according to the target message in the log.

[0077] It can be understood that, in this embodiment, the proxy forwarding data of the reverse proxy service can be determined according to the target message, and then the call chain of the reverse proxy service can be determined according to the proxy forwarding data.

[0078] Further, S130 may include:

[0079] The target message is extracted from the log using kafka software, and the call chain of the reverse proxy service is determined according to the extracted target message.

[0080] In order to efficiently determine the fault location and fault node in the call chain, the embodiment of the present application may further include the following steps:

[0081] Output the call chain of the reverse proxy service through a visual interface;

[0082] The faulty node in the call chain of the reverse proxy service is marked on the visual interface.

[0083] This embodiment can first connect the call chains that cannot be determined through nginx component proxy forwarding, and then output the call chain of the reverse proxy service through the pinpoint visualization interface, so as to monitor the performance of the nginx component in real time, help developers understand the dependencies between various services and quickly locate faults.

[0084] Next, the solution of the embodiment of the present application will be described in detail and explained in conjunction with specific application examples:

[0085] In order to make up for the shortcomings of nginx components in performance monitoring and link tracking, it is particularly important to develop a custom nginx component tracking plug-in based on pinpoint. This plug-in can realize real-time monitoring of key performance indicators of nginx components (such as request response time, throughput, error rate, etc.), and through the link tracking function of pinpoint, it can associate the requests flowing through the nginx component with the requests of upstream and downstream services to form a complete call chain.

[0086] This embodiment provides a method for a tracking plug-in based on a custom nginx component of pinpoint, aiming to expand the application field of the pinpoint monitoring framework so that it is not limited to Java applications, but also covers distributed systems that use nginx components as key infrastructure. By implementing tracking at the nginx level, the network traffic entering and leaving the proxy service can be fully monitored, filling the gaps in the monitoring link and realizing full-link monitoring of the traffic flowing through the nginx component.

[0087] Reference Figure 2 , this embodiment provides an example flow chart of a proxy service call chain monitoring method.

[0088] Specifically, this embodiment may include the following contents:

[0089] 1. Embed a custom Lua script plug-in based on the pinpoint principle in the nginx component.

[0090] The lua script plug-in of this embodiment includes an agentInfo message plug-in for generating a pinpoint and a span message plug-in for generating a pinpoint.

[0091] Specifically, the configuration process of the agentInfo message plug-in includes:

[0092] (1) Generate the following data in the Lua plug-in: agentId (configurable name), version (fixed to 0), startTimestamp (agent start time), eventTimestamp (agent message sending time), eventIdentifier (fixed to 4294972408), agentLifeCycleState (fill in according to the status of the service, mainly divided into STARTING, RUNNING, SHUTDOWN), hostName (host IP address).

[0093] (2) Generate the init_by_lua.lua file according to the above logic.

[0094] (3) Add init_by_lua_file\home\workSpace\codeSpace\pp-span-lua\src\init_by_lua.lua to the next link of http in the nginx.config configuration file.

[0095] The configuration process of the span message plug-in includes:

[0096] The span message plug-in can have two tracking logics. One is to intercept the external http request flowing through nginx, connect the upstream and downstream links in series, and generate the nginx link data; the other is the nginx request itself, generate the nginx link data, and flow the message with pinpoint through the downstream through the http request.

[0097] (1) If there is no data upstream, spanID (generation rules must ensure uniqueness), traceID (generation rules must ensure uniqueness), and pinpointHost (the IP and port of this service) are generated independently, and passed to the next httpheader pinpoint-Host in proxy forwarding. The pinpoint-pspanID injection value is empty, the pinpoint-traceID is injected into the traceID, the pinpoint-spanID is injected into the spanID, the pinpoint-pAppName is injected into the service name (customizable), the pinpoint-Flags injection value is 0 (fixed value), and the pinpoint-pAppType injection value is 1000 (nginx type code).

[0098] (2) If there is data in the upstream, receive the request sent by the upstream, and obtain the information of pinpoint-Host, pinpoint-pspanID, pinpoint-traceID, and pinpoint-spanID from the header. In the proxy forwarding, the pinpoint-Host header passed to the next http header is injected with pinpointHost (the IP and port of this service), the pinpoint-pspanID injection value is the value of the upstream header pinpoint-spanID, the pinpoint-traceID is injected with the value of the upstream header pinpoint-traceID, the pinpoint-spanID is injected with the self-generated spanID (the generation rule must ensure uniqueness), the pinpoint-pAppName is injected with the name of the service (customizable), the pinpoint-Flags injection value is 0 (fixed value), and the pinpoint-pAppType injection value is 1000 (nginx type code).

[0099] (3) Generate the pp_access_by_lua_file.lua file according to the above logic.

[0100] (4) Add access_by_lua_file\home\workSpace\codeSpace\pp-spanlua\src\pp_access_by_lua_file.lua to the next section of location in the nginx.conf configuration file.

[0101] 2. Extract the log of the pinpoint call chain:

[0102] The configured agentInfo message plug-in and span message plug-in can be used to generate agentInfo messages and span messages in the logs of the nginx component respectively, and then extract the logs through logstash and send them to kafka.

[0103] By embedding the agentInfo message plug-in and span message plug-in in the nginx component through pinpoint, key performance indicators such as user requests can be captured and recorded to better understand and optimize the performance of the application. The beneficial effects of this embodiment include:

[0104] (1) Monitor the performance of nginx components in real time to help developers quickly locate bottlenecks and problem areas.

[0105] (2) Use the message plug-in to determine the call chain that cannot be determined by the nginx component, and use the pinpoint visualization interface to output it, which makes it easier to understand the dependencies between services.

[0106] (3) The non-intrusive design of the message plug-in reduces the workload of modifying nginx components and reduces development costs.

[0107] Reference Figure 3 The embodiment of the present application also provides a proxy service call chain monitoring device, which can implement the above-mentioned proxy service call chain monitoring method, and the device includes:

[0108] A plug-in embedding unit, used to embed a message plug-in in the management software of the reverse proxy service;

[0109] A message generating unit, configured to generate a target message in the log of the reverse proxy service by using the message plug-in;

[0110] A log acquisition unit, used to acquire the log from the reverse proxy service;

[0111] A call chain determination unit is used to determine the call chain of the reverse proxy service according to the target message in the log.

[0112] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0113] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned proxy service call chain monitoring method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0114] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0115] See also Figure 4 , Figure 4 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0116] The processor 401 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0117] The memory 402 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 402 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 402, and the processor 401 calls and executes the proxy service call chain monitoring method of the embodiment of this application;

[0118] Input / output interface 403, used to implement information input and output;

[0119] Communication interface 404, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0120] Bus 405 , which transmits information between various components of the device (e.g., processor 401 , memory 402 , input / output interface 403 , and communication interface 404 );

[0121] The processor 401 , the memory 402 , the input / output interface 403 and the communication interface 404 are connected to each other in communication within the device via the bus 405 .

[0122] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned proxy service call chain monitoring method is implemented.

[0123] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0124] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0125] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0126] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0127] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0128] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0129] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0130] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0131] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0132] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0133] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0134] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0135] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A proxy service call chain monitoring method, characterized in that: The method comprises the following steps: Embed a message plug-in in the management software of the reverse proxy service; Using the message plug-in to generate a target message in the log of the reverse proxy service; Obtain the log from the reverse proxy service; Determine the call chain of the reverse proxy service according to the target message in the log.

2. A proxy service call chain monitoring method according to claim 1, characterized in that: The method of embedding a message plug-in in the management software of the reverse proxy service comprises the following steps: The message plug-in written in lua scripting language is embedded in the nginx component; wherein the nginx component is the management software of the reverse proxy service.

3. A proxy service call chain monitoring method according to claim 2, characterized in that: The step of embedding the message plug-in written in the lua scripting language in the nginx component comprises the following steps: Using the lua scripting language to write an agentInfo message plug-in for obtaining the agentInfo message, and adding the agentInfo message plug-in to the configuration file in the nginx component; A span message plug-in for obtaining span messages is written using the lua scripting language, and the span message plug-in is added to the configuration file in the nginx component.

4. A proxy service call chain monitoring method according to claim 3, characterized in that: The method of using the Lua scripting language to write a span message plug-in for obtaining span messages includes the following steps: A first plug-in for obtaining span messages is written in Lua scripting language; wherein the first plug-in is used to generate first proxy data of the nginx component in response to a request of the nginx component, obtain a first span message from the first proxy data, and transmit the first span message to a downstream service through a request link; A second plug-in for obtaining span messages is written in Lua scripting language; wherein the second plug-in is used to receive a request from an upstream service, forward the request from the upstream service to a corresponding downstream service, generate second proxy data, obtain a second span message from the second proxy data, and pass the second span message to the downstream service through a request link.

5. A proxy service call chain monitoring method according to claim 1, characterized in that: The step of obtaining the log from the reverse proxy service comprises the following steps: The log is obtained from the reverse proxy service using logstash software.

6. A proxy service call chain monitoring method according to claim 1, characterized in that: Determining the call chain of the reverse proxy service according to the target message in the log includes the following steps: The target message is extracted from the log using kafka software, and the call chain of the reverse proxy service is determined according to the extracted target message.

7. A proxy service call chain monitoring method according to any one of claims 1 to 6, characterized in that: The method further comprises the following steps: Output the call chain of the reverse proxy service through a visual interface; The faulty node in the call chain of the reverse proxy service is marked on the visual interface.

8. A proxy service call chain monitoring device, characterized in that: The device comprises: A plug-in embedding unit, used to embed a message plug-in in the management software of the reverse proxy service; A message generating unit, configured to generate a target message in the log of the reverse proxy service by using the message plug-in; A log acquisition unit, used to acquire the log from the reverse proxy service; A call chain determination unit is used to determine the call chain of the reverse proxy service according to the target message in the log.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements a proxy service call chain monitoring method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a proxy service call chain monitoring method as described in any one of claims 1 to 7 is implemented.