Cloud platform service tracking method and device, equipment and storage medium

By introducing tracking middleware and distributed tracking applications into the openstack cloud platform, observability tracking of cloud platform services is solved, and the problem of insufficient observability of cloud computing platforms in the existing technology is improved, and the reliability of the platform is improved. stability.

CN118945222APending Publication Date: 2024-11-12BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411003954.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In the prior art, the openstack distributed cloud computing platform lacks observability tracking, which makes it difficult to guarantee the reliability of the cloud computing platform.

Method used

By introducing tracking middleware into the tracking system of cloud platform services, we determine the tracking type of target cloud platform components, and obtain and report tracking data to the distributed tracking application according to the type, save it to the database, and provide an interface to view tracking data, so as to realize Observability tracking of cloud platform services.

Benefits of technology

It improves the reliability and observability of the cloud platform, can more effectively troubleshoot and solve performance problems, and improves the stability of the cloud computing platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945222A_ABST
    Figure CN118945222A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cloud computing, and provides a cloud platform service tracking method, device and equipment and a storage medium, which are applied to tracking middleware in a cloud platform service tracking system, and the tracking system comprises a cloud platform and a tracking application. The cloud platform comprises at least one cloud platform component and tracking middleware corresponding to each cloud platform component, and the tracking middleware is target middleware installed in a target cloud platform component; the method comprises the following steps: determining a tracking type corresponding to a target cloud platform component; and obtaining tracking data of the target cloud platform component according to the tracking type, and reporting the tracking data of the target cloud platform component to a tracking application which is an end-to-end distributed tracking application, the tracking data of the target cloud platform component is used for the tracking application to store the tracking data of the target cloud platform component into a database of the tracking application, and an interface for checking the tracking data of the target cloud platform component is provided, so that observability tracking of the cloud platform service is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular to a method, device, equipment and storage medium for tracking cloud platform services. Background Art

[0002] In a distributed cloud computing platform, discovering macro-level performance issues often requires extensive debugging or querying large amounts of logs.

[0003] In the prior art, the openstack cloud computing platform provides an application programming interface for services. Through the openstack application programming interface, the status of each service (down or up) can be queried. When describing the port status, displaying down indicates a problem, and displaying up indicates a normal status; or the service logs of each distributed node are collected. For example, if the service does not report a heartbeat for 60 seconds, the status interface is provided in the form of service down, but if the service responds slowly or is blocked, the status is still up. Or all service logs of each distributed node are checked through logs. However, there is currently a lack of observable tracking of the services of the openstack distributed cloud computing platform, which makes it difficult to ensure the reliability of the cloud computing platform.

[0004] Therefore, how to achieve observability tracking of cloud platform services has become a technical problem that needs to be urgently solved in the industry. Summary of the invention

[0005] In view of the problems existing in the prior art, the present invention provides a cloud platform service tracking method, device, equipment and storage medium, which realizes the tracking of the observability of cloud platform services.

[0006] In a first aspect, the present invention provides a tracking method for a cloud platform service, which is applied to a tracking middleware in a tracking system for a cloud platform service, wherein the system includes a cloud platform and a tracking application, wherein the cloud platform includes at least one cloud platform component and the tracking middleware corresponding to each of the cloud platform components, wherein the tracking middleware is a target middleware installed in a target cloud platform component; the method includes: Determine a tracking type corresponding to the target cloud platform component; The tracking data of the target cloud platform component is obtained according to the tracking type, and the tracking data of the target cloud platform component is reported to the tracking application; the tracking application is an end-to-end distributed tracking application, and the tracking middleware is the target middleware corresponding to the tracking application. The tracking data of the target cloud platform component is used for the tracking application to save the tracking data of the target cloud platform component into the database of the tracking application, and provide an interface for viewing the tracking data of the target cloud platform component.

[0007] Optionally, acquiring the tracking data of the target cloud platform component according to the tracking type, and reporting the tracking data of the target cloud platform component to the tracking application includes: Determining a service application program interface for tracking the target cloud platform component according to a tracking type corresponding to the target cloud platform component; Writing a target call function into the service application program interface so that the service application program tracks the data of the target cloud platform component when running, and obtains the tracking data of the target cloud platform component; Reporting the tracking data of the target cloud platform component to the tracking application.

[0008] Optionally, the tracing type includes at least one of the following: database tracing, HTTP request tracing, cache tracing, and remote procedure call tracing; the obtaining the tracing data of the target cloud platform component according to the tracing type and reporting the tracing data of the target cloud platform component to the tracing application includes: In the case where the tracking type is the database tracking, determining the database tool program interface of the target cloud platform component as the service application program interface included in the target cloud platform component; Writing an event monitoring function into the database tool program interface so that the database tool program tracks the database of the target cloud platform component when running, and obtains database tracking data of the target cloud platform component; In the case where the tracking type is HTTP request tracking, determining the HTTP request tool program interface of the target cloud platform component as the service application program interface included in the target cloud platform component; Writing a wrapper function into the HTTP request tool program interface so that the HTTP request tool program can track the HTTP request of the target cloud platform component when it is running, and obtain HTTP request tracking data of the target cloud platform component; In the case where the tracking type is cache tracking, determining the cache tool program interface of the target cloud platform component as the service application program interface included in the target cloud platform component; Writing a package function in the cache tool program interface so that the cache tool program can track the cache of the target cloud platform component when it is running, and obtain cache tracking data of the target cloud platform component; In the case where the tracing type is remote procedure call tracing, determining the remote procedure call tool program interface of the target cloud platform component as the service application program interface included in the target cloud platform component; Writing a package function into the remote procedure call tool program interface so that the remote procedure call tool program can track the remote procedure call of the target cloud platform component when it is running, and obtain the remote procedure call tracking data of the target cloud platform component; The tracking data of the target cloud platform component is determined based on the database tracking data, the HTTP request tracking data, the cache tracking data and the remote procedure call tracking data.

[0009] Optionally, before determining the tracking type corresponding to the target cloud platform component, the method further includes: Installing the tracking middleware in the service running environment of the target cloud platform component; Adding the setting file of the tracking middleware and the deployment address and running service address of the tracking middleware to the configuration file of the target cloud platform component; The target cloud platform component is restarted to obtain the target cloud platform component on which the tracking middleware is installed.

[0010] In a second aspect, the present invention further provides a tracking system for cloud platform services, the system comprising a cloud platform and a tracking application, the cloud platform comprising at least one cloud platform component and tracking middleware corresponding to each of the cloud platform components, the tracking middleware being a target middleware installed in a target cloud platform component; The tracking middleware is used to determine the tracking type corresponding to the target cloud platform component; obtain the tracking data of the target cloud platform component according to the tracking type, and report the tracking data of the target cloud platform component to the tracking application; the tracking application is an end-to-end distributed tracking application; the tracking middleware is the target middleware corresponding to the tracking application; The tracking application is used to save the tracking data of the target cloud platform component into a database and provide an interface for viewing the tracking data of the target cloud platform component.

[0011] Optionally, the tracking middleware is specifically used for: Determining a service application program interface for tracking the target cloud platform component according to a tracking type corresponding to the target cloud platform component; Writing a target call function into the service application program interface so that the service application program tracks the data of the target cloud platform component when running, and obtains the tracking data of the target cloud platform component; Reporting the tracking data of the target cloud platform component to the tracking application.

[0012] In a third aspect, the present invention further provides a tracking device for a cloud platform service, which is applied to a tracking middleware in a tracking system for a cloud platform service, wherein the system includes a cloud platform and a tracking application, wherein the cloud platform includes at least one cloud platform component and the tracking middleware corresponding to each cloud platform component, wherein the tracking middleware is a target middleware installed in a target cloud platform component; the device includes: A determination module, used to determine the tracking type corresponding to the target cloud platform component; A tracking module is used to obtain the tracking data of the target cloud platform component according to the tracking type, and report the tracking data of the target cloud platform component to the tracking application; the tracking application is an end-to-end distributed tracking application, the tracking middleware is the target middleware corresponding to the tracking application, and the tracking data of the target cloud platform component is used for the tracking application to save the tracking data of the target cloud platform component into the database of the tracking application, and provide an interface for viewing the tracking data of the target cloud platform component.

[0013] In a fourth aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a method for tracking a cloud platform service as described above is implemented.

[0014] In a fifth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for tracking cloud platform services as described in any one of the above.

[0015] In a sixth aspect, the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements a method for tracking a cloud platform service as described in any one of the above.

[0016] The present invention provides a tracking method, device, equipment and storage medium for cloud platform services. The method is applied to the tracking middleware in the tracking system of the cloud platform service. The tracking system includes a cloud platform and a tracking application. The cloud platform includes at least one cloud platform component and the tracking middleware corresponding to each cloud platform component. The tracking middleware is the target middleware installed in the target cloud platform component. First, the tracking type corresponding to the target cloud platform component is determined. Then, the tracking data of the target cloud platform component is obtained according to the tracking type, and the tracking data of the target cloud platform component is reported to the tracking application, wherein the tracking application is an end-to-end distributed tracking application, and the tracking data of the target cloud platform component is used for the tracking application to save the tracking data of the target cloud platform component into the database of the tracking application, and provide an interface for viewing the tracking data of the target cloud platform component.

[0017] The tracking middleware in the present invention is installed on the target cloud platform component. The tracking middleware obtains the tracking data of the target cloud platform component according to the tracking type corresponding to the target cloud platform component, and reports the tracking data of the target cloud platform component to the tracking application. The tracking application is an end-to-end distributed tracking application. The tracking application provides an interface for viewing the tracking data of the target cloud platform component, thereby realizing the tracking of the observability of the cloud platform service. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 It is a flow chart of the cloud platform service tracking method provided by the present invention.

[0020] Figure 2 This is one of the structural diagrams of the tracking system of the cloud platform service provided by the present invention.

[0021] Figure 3 This is the second structural diagram of the tracking system of the cloud platform service provided by the present invention.

[0022] Figure 4 It is a structural schematic diagram of the tracking device of the cloud platform service provided by the present invention.

[0023] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] In order to more clearly understand the various embodiments provided by the present invention, the technical content involved in the present invention is first introduced as follows.

[0026] Openstack: Openstack is an open source cloud computing platform designed to provide scalable Infrastructure as a Service (IaaS). It consists of a series of interrelated services that can be used to build and manage private and public cloud environments.

[0027] Jaeger: Open source distributed tracing application.

[0028] Distributed Tracing OpenTracing: An open standard for distributed tracing designed to help developers track the flow and performance of requests in complex distributed systems.

[0029] wsgi: Python Web Server Gateway Interface.

[0030] Nova: Openstack component that provides computing services.

[0031] api-paste.ini: A configuration file of OpenStack that defines the request processing flow in the Application Programming Interface (API) service. It is a configuration file based on PasteDeploy, which is used to configure the middleware and request processing flow in the OpenStack service. Paste Deploy is a system for discovering and configuring Web Server Gate Interface (WSGI) applications and services.

[0032] Combine the following Figure 1-Figure 5 The cloud platform service tracking method, device, equipment and storage medium of the present invention are described.

[0033] Figure 1 is a flow chart of the tracking method of the cloud platform service provided by the present invention, which is applied to the tracking middleware in the tracking system of the cloud platform service. The system includes a cloud platform and a tracking application. The cloud platform includes at least one cloud platform component and the tracking middleware corresponding to each cloud platform component. The tracking middleware is the target middleware installed in the target cloud platform component; Figure 1 As shown, the method includes: Step 101: Determine the tracking type corresponding to the target cloud platform component; Specifically, the execution subject of this embodiment is the tracking middleware in the tracking system of the cloud platform service, which is used to achieve the tracking of the observability of the cloud platform service, and can improve the reliability of the cloud platform to a certain extent.

[0034] Among them, the tracking system of cloud platform services refers to Figure 2 As shown, Figure 2 2 is a schematic diagram of a tracking system for a cloud platform service provided by the present invention. The system 200 includes a cloud platform 210 and a tracking application 220. The cloud platform includes at least one cloud platform component 230 ( Figure 2 The middle cloud platform includes three cloud platform components) and a tracking middleware 240 corresponding to each cloud platform component, and the tracking middleware is installed in the corresponding target cloud platform component.

[0035] In this method, the tracking type corresponding to the target cloud platform component must be determined first. For example, the main cloud platform components of the openstack cloud platform include nova computing components, cinder block storage components, neutron network components, swift object storage components, heat orchestration components, etc. Each cloud platform component has its own service API, which is equivalent to the import and export of other services. For example, the nova computing component includes database API services, HyperText Transfer Protocol (HTTP) request API services, cache API services, remote procedure call (RPC) API services, Schduler scheduling service APIs, and Compute computing service APIs; the cinder block storage component includes API services, scheduler scheduling service APIs, and Volume volume service APIs. The service APIs are service APIs that all openstack components need to have. It is understandable that different tracing types correspond to different service APIs, and the tracing data of a specific tracing type can be obtained from the corresponding service application program interface. In other words, different tracing types obtain corresponding tracing data based on the corresponding service APIs contained in each component. For example, when using the service API of the nova computing component, the tracing types in the entire process are tracked for database calls, cache calls, remote procedure calls, and other component API service calls.

[0036] Step 102: Obtain the tracking data of the target cloud platform component according to the tracking type, and report the tracking data of the target cloud platform component to the tracking application; the tracking application is an end-to-end distributed tracking application, and the tracking middleware is the target middleware corresponding to the tracking application. The tracking data of the target cloud platform component is used for the tracking application to save the tracking data of the target cloud platform component to the database of the tracking application, and provide an interface for viewing the tracking data of the target cloud platform component.

[0037] Specifically, after determining the tracing type, the tracing middleware obtains the tracing data of the target cloud platform component from the service API according to the tracing type, and after obtaining the tracing data of the target cloud platform component, reports the tracing data of the target cloud platform component to the tracing application. The tracing middleware is the target middleware corresponding to the tracing application, and the tracing application is an end-to-end distributed tracing application, such as a jaeger distributed tracing application.

[0038] Furthermore, the tracking data of the target cloud platform component is used for the tracking application to save the tracking data of the target cloud platform component to the database of the tracking application, and provide an interface for viewing the tracking data of the target cloud platform component. More specifically, the interface displays the tracking results after the middleware, for example, including the following parameters: the tracking start time trace start, the interval time duration, the number of components monitored by the table service, and the tracking call depth number Depth; exemplarily, in a tracking, the client called the GET interface provided by nova-api, and the interface used the cache and made a memcache GET call. The call time is shown in the figure as 1.06 milliseconds. At the same time, the interface called other GET interfaces of its own nova-api, and the call time was 40.53 milliseconds. The interface called the GET request of the neutron component, which took 32.76 milliseconds. The interface used the cache memcache get, which took 1.24 milliseconds. The database was queried twice, and the sql select times were 0.8 milliseconds and 0.83 milliseconds respectively. It is understandable that the data interface is used to display the capabilities provided by the tracking service. For example, if a request takes a long time, it can be specifically determined which component or operation caused the long time. This troubleshooting capability can improve the observability and tracking of components, thereby improving the reliability of the cloud platform.

[0039] The method provided in this embodiment is applied to the tracking middleware in the tracking system of the cloud platform service. The tracking system includes a cloud platform and a tracking application. The cloud platform includes at least one cloud platform component and the tracking middleware corresponding to each cloud platform component. The tracking middleware is the target middleware installed in the target cloud platform component. First, the tracking type corresponding to the target cloud platform component is determined. Then, the tracking data of the target cloud platform component is obtained according to the tracking type, and the tracking data of the target cloud platform component is reported to the tracking application, wherein the tracking application is an end-to-end distributed tracking application, the tracking middleware is the target middleware corresponding to the tracking application, and the tracking data of the target cloud platform component is used for the tracking application to save the tracking data of the target cloud platform component to the database of the tracking application, and provide an interface for viewing the tracking data of the target cloud platform component.

[0040] The tracking middleware in this method is installed on the target cloud platform component. The tracking middleware obtains the tracking data of the target cloud platform component according to the tracking type corresponding to the target cloud platform component, and reports the tracking data of the target cloud platform component to the tracking application. The tracking application is an end-to-end distributed tracking application, and the tracking middleware is the target middleware corresponding to the tracking application. The tracking application provides an interface for viewing the tracking data of the target cloud platform component, thereby realizing the tracking of the observability of the cloud platform service.

[0041] Optionally, obtaining the tracking data of the target cloud platform component according to the tracking type, and reporting the tracking data of the target cloud platform component to the tracking application, includes: Determine the service application program interface for tracking the target cloud platform component according to the tracking type corresponding to the target cloud platform component; Writing a target call function in the service application program interface so that the service application program can track the data of the target cloud platform component when running, and obtain the tracking data of the target cloud platform component; Report the tracking data of the target cloud platform component to the tracking application.

[0042] Specifically, in some embodiments, step 102 may be implemented by the following steps: First, according to the tracking type corresponding to the target cloud platform component, determine the service application program interface for tracking the target cloud platform component. It can be understood that different tracking types correspond to different service application program interface APIs, and specific types of tracking data can be obtained from the corresponding service application program interface. Among them, the tracking type refers to which type of data is tracked, or what the acquired data itself is used for. For example, the main components of the openstack cloud platform include nova computing components, cinder block storage components, neutron network components, swift object storage components, heat orchestration components, etc. Each component has its own service application program interface API, and the service API is equivalent to the import and export of other services. For example, the nova computing component includes its own API service, Schduler scheduling service API, and Compute computing service API; the cinder block storage service includes API service, scheduler scheduling service API, and Volume volume service API. The service API is a service API that all openstack components need to have. Correspondingly, based on the tracking type, the service API contained in the component can be determined. Regarding the tracing type, for any component, the tracing type is, for example, the tracing of the component database, that is, database tracing; another example, the tracing type is the tracing of the component HTTP request, that is, HTTP request tracing; another example, the tracing type is the tracing of the component cache, that is, cache tracing; another example, the tracing type is the tracing of the component remote procedure call RPC, that is, remote procedure call tracing.

[0043] Furthermore, after the corresponding service API is determined, the target call function can be written into the service API so that the service application can track the data of the target cloud platform component when it is running, and then the tracking data of the target cloud platform component can be obtained. For example, the tracking type is database tracking, and the common ORM service sqlalchemy of each component, that is, the core library corresponding to the database tracking type is sqlalchemy. This embodiment adds the target call function (before_cursor_execute, after_cursor_execute) to the core library sqlalchemy through the service API for event monitoring, so that sqlalchemy can track the database by calling the event monitoring function at runtime, and obtain the tracking data of the target cloud platform component.

[0044] Furthermore, the tracking middleware can report the tracking data of the target cloud platform component to the tracking application. Among them, the tracking middleware is the target middleware corresponding to the tracking application, and can conveniently and quickly transmit data with the tracking application. For example, if the tracking application is a jaeger distributed tracking application, the tracking middleware is jaeger_middleware. For another example, if the tracking application is skywalking, the tracking middleware is skywalking_middleware. It can be understood that other applications that can be used for tracking can be used in the present invention, and this embodiment does not limit the types of tracking applications and tracking middleware.

[0045] In the method provided in this embodiment, firstly, according to the tracking type corresponding to the target cloud platform component, the service application program interface for tracking the target cloud platform component is determined; then, the target call function is written into the service application program interface, so that when the service application is running, the data of the target cloud platform component is tracked to obtain the tracking data of the target cloud platform component; then, the tracking data of the target cloud platform component is reported to the tracking application. This method realizes the tracking of the observability of cloud platform services through middleware and tracking applications.

[0046] Optionally, the tracing type includes at least one of the following: database tracing, HTTP request tracing, cache tracing, and remote procedure call tracing; obtaining tracing data of the target cloud platform component according to the tracing type, and reporting the tracing data of the target cloud platform component to the tracing application, includes: In the case where the tracking type is database tracking, the database tool program interface of the target cloud platform component is determined as the service application program interface included in the target cloud platform component; An event listening function is written into the database tool program interface, so that the database of the target cloud platform component is tracked when the database tool program is running, and database tracking data of the target cloud platform component is obtained; In the case where the tracing type is HTTP request tracing, the HTTP request tool program interface of the target cloud platform component is determined as the service application program interface included in the target cloud platform component; Writing a wrapper function in the HTTP request tool program interface enables the HTTP request tool program to track the HTTP request of the target cloud platform component when running, and obtain the HTTP request tracking data of the target cloud platform component; In the case where the tracking type is cache tracking, the cache tool program interface of the target cloud platform component is determined as the service application program interface included in the target cloud platform component; Write a wrapper function in the cache tool program interface, so that the cache tool program can track the cache of the target cloud platform component when running, and obtain the cache tracking data of the target cloud platform component; In the case where the tracing type is remote procedure call tracing, the remote procedure call tool program interface of the target cloud platform component is determined as the service application program interface included in the target cloud platform component; Writing a wrapper function in the remote procedure call tool program interface so that the remote procedure call tool program can track the remote procedure call of the target cloud platform component when it is running, and obtain the remote procedure call tracking data of the target cloud platform component; Determine the tracking data of the target cloud platform components based on the database tracking data, HTTP request tracking data, cache tracking data, and remote procedure call tracking data.

[0047] Specifically, in some embodiments, the tracing type includes at least one of the following: database tracing, HTTP request tracing, cache tracing, and remote procedure call tracing, wherein database tracing is a tracing type for component database, HTTP request tracing is a tracing type for component HTTP request, cache tracing is a tracing type for component cache, and remote procedure call tracing is a tracing type for component remote procedure call RPC.

[0048] Correspondingly, step 102 can be implemented by the following steps: The first step is to determine the tracing data of the target cloud platform components corresponding to each tracing type.

[0049] Wherein, when the tracking type is database tracking, first, the database tool program interface of the target cloud platform component is determined as the service application program interface included in the target cloud platform component; then, the event monitoring function is written in the database tool program interface, so that the database of the target cloud platform component is tracked when the database tool program is running, and the database tracking data of the target cloud platform component is obtained. Wherein, the database tool program of each cloud platform component of the openstack cloud platform, that is, the general object relational mapping (ORM) core library is sqlalchemy. Exemplarily, in this embodiment, the tracking middleware adds the event monitoring functions of before_cursor_execute and after_cursor_execute to the core library sqlalchemy through the API service, so that the tracking function is integrated when using sqlalchemy for database operations, and the database tracking data of the target cloud platform component is tracked.

[0050] In the case where the tracking type is HTTP request tracking, the HTTP request tool program interface of the target cloud platform component is determined as the service application program interface included in the target cloud platform component; then, a wrapper function is written in the HTTP request tool program interface, so that the HTTP request of the target cloud platform component is tracked when the HTTP request tool program is running, and the HTTP request tracking data of the target cloud platform component is obtained. Among them, the services that implement HTTP requests in the HTTP request tool programs of each cloud platform component of the openstack cloud platform include core libraries such as urllib, urllib2, and requests. Exemplarily, the middleware of the present invention adds a wrapper function Wrapper Function to each core library urllib, urllib2, and requests that implement HTTP request services in the cloud platform openstack through an API service, thereby realizing the tracking of HTTP requests and obtaining the HTTP request tracking data of the target cloud platform component. The wrapper function Wrapper Function can be understood as if function A calls function B. We can say that A is a wrapper function of B, also called a wrapper function.

[0051] When the tracking type is cache tracking, first, the cache tool program interface of the target cloud platform component is determined as the service application program interface contained in the target cloud platform component; then, the encapsulation function is written in the cache tool program interface, so that the cache tool program can track the cache of the target cloud platform component when it is running, and obtain the cache tracking data of the target cloud platform component. Among them, each cloud platform component of the openstack cloud platform uses the memcache package to operate the cache service, that is, the cache tool program interface is the memcache package. For example, the cache tracking is realized by wrapping the get and set methods in memcache.Client through the tracking middleware, that is, the Wrapper Function, and the cache tracking data of the target cloud platform component is obtained.

[0052] When the tracing type is remote procedure call tracing, first, the remote procedure call tool program interface of the target cloud platform component is determined as the service application program interface contained in the target cloud platform component; then, the encapsulation function is written in the remote procedure call tool program interface, so that the remote procedure call of the target cloud platform component is tracked when the remote procedure call tool program is running, and the remote procedure call tracing data of the target cloud platform component is obtained. Among them, the common core library of the openstack cloud platform rpc component is oslo_messaging. For example, the call, cast, and dispatch in oslo_messaging are packaged through the API service, that is, the Wrapper Function is added to realize the corresponding data tracking, and the remote procedure call tracing data of the target cloud platform component is obtained.

[0053] In a second step, the tracking data of the target cloud platform component is determined according to the tracking data of the target cloud platform component corresponding to each tracking type.

[0054] For example, the target cloud platform component's tracking data is determined based on the database tracking data, HTTP request tracking data, cache tracking data, and remote procedure call tracking data obtained in the first step. For example, the tracking data of the target cloud platform component corresponding to each tracking type is aggregated by type and deduplicated to obtain the tracking data of the target cloud platform component.

[0055] In the method provided in this embodiment, the tracking types include at least one of the following: database tracking, HTTP request tracking, cache tracking and remote procedure call tracking; first, the tracking data of the target cloud platform component corresponding to each tracking type is determined, and then, the tracking data of the target cloud platform component is determined according to the tracking data of the target cloud platform component corresponding to each tracking type, thereby realizing the tracking of the observability of the cloud platform service through the tracking middleware and the tracking application, and improving the reliability of the cloud computing platform to a certain extent.

[0056] Optionally, before determining the tracking type corresponding to the target cloud platform component, the method further includes: Install the tracking middleware in the service runtime environment of the target cloud platform component; Add the setting file of the tracking middleware, the deployment address of the tracking middleware, and the running service address to the configuration file of the target cloud platform component; Restart the target cloud platform component to obtain the target cloud platform component where the tracking middleware is installed.

[0057] Specifically, in some embodiments, before determining the tracking type corresponding to the target cloud platform component, the method further includes: installing and configuring the tracking middleware in the target cloud platform component that needs to be tracked. The process is exemplified as follows: First, the tracking middleware is installed in the service operating environment of the target cloud platform component. For example, the cloud platform component of the nova computing service installs the tracking middleware provided by the present invention through pip in the operating environment of the nova computing service, wherein pip is a Python package management tool that provides the functions of searching, downloading, installing, and uninstalling Python packages. It should be noted that other tools that can be used for installing programs can also be used to install the tracking middleware, and this embodiment does not specifically limit the tools and installation steps used to install the tracking middleware.

[0058] Then, it is understandable that after installation, corresponding configuration is required, that is, modifying the configuration file of the target cloud platform component to reconfigure the target cloud platform component. The configuration process is, for example, adding the setting file of the tracking middleware and the deployment address and running service address of the tracking middleware to the configuration file of the target cloud platform component, so as to add the middleware to the pipeline of the target cloud platform component. Among them, the configuration file of the target cloud platform component is, for example, the configuration file api-paste.ini under the openstack cloud platform. api-paste.ini is a configuration file of the openstack cloud platform, which is used to define the request processing flow in the API service of each cloud platform component. It is a configuration file based on Paste Deploy, which is used to configure the middleware and request processing flow in the openstack service. The deployment address of the tracking middleware and the running service address can be obtained when deploying the tracking application, such as the addresses of the report and sample of the middleware. The address of Report is the address of the jaeger service deployed through the open source jaeger container image. The default ports are 6831 and 6832, and the default IP address is 127.0.0.1, which is the local address. You can define the port number yourself during deployment. The address of sample, which is the port address of the middleware provided by this application, can customize the port number as long as it does not conflict with other service ports of the server. The address can be configured as a local address or as an address where the server can provide services to the outside world.

[0059] Furthermore, after the tracking middleware is installed in the target cloud platform component and the configuration file of the tracking middleware is modified, the target cloud platform component is restarted. At this time, the target cloud platform component with the tracking middleware installed is obtained. Subsequently, the tracking data of each component can be obtained based on the tracking middleware installed in the target cloud platform component and reported to the tracking application.

[0060] In the method provided in this embodiment, first, the tracking middleware is installed in the service running environment of the target cloud platform component, and then the setting file of the tracking middleware and the deployment address and running service address of the tracking middleware are added to the configuration file of the target cloud platform component; then, the target cloud platform component is restarted to obtain the target cloud platform component with the tracking middleware installed. This facilitates the subsequent acquisition of the tracking data of each component based on the installed tracking middleware in the target cloud platform component and reports it to the tracking application, thereby realizing the observability tracking of the cloud platform service.

[0061] Figure 2 This is one of the structural diagrams of the tracking system of the cloud platform service provided by the present invention, such as Figure 2 As shown, the system includes a cloud platform 210 and a tracking application 220, wherein the cloud platform includes at least one cloud platform component 230 and a tracking middleware 240 corresponding to each of the cloud platform components, wherein the tracking middleware is a target middleware installed in a target cloud platform component; The tracking middleware 240 is used to determine the tracking type corresponding to the target cloud platform component; obtain the tracking data of the target cloud platform component according to the tracking type, and report the tracking data of the target cloud platform component to the tracking application; the tracking application is an end-to-end distributed tracking application; the tracking middleware is the target middleware corresponding to the tracking application; Specifically, the executor of this embodiment is a tracking system of cloud platform services, which is used to implement observability tracking of cloud platform services, which can improve the reliability of the cloud platform to a certain extent.

[0062] Among them, the tracking system of cloud platform services refers to Figure 2 As shown, Figure 2 2 is a schematic diagram of a tracking system for a cloud platform service provided by the present invention. The system 200 includes a cloud platform 210 and a tracking application 220. The cloud platform includes at least one cloud platform component 230 ( Figure 2 The middle cloud platform includes three cloud platform components) and a tracking middleware 240 corresponding to each cloud platform component, and the tracking middleware is installed in the corresponding target cloud platform component.

[0063] The tracking middleware 240 in the system is first used to determine the tracking type corresponding to the target cloud platform component; illustratively, the main cloud platform components of the openstack cloud platform include nova computing components, cinder block storage components, neutron network components, swift object storage components, heat orchestration components, etc. Each cloud platform component has its own service application programming interface (Application Programming Interface, API), and the service API is equivalent to the import and export of other services. For example, the nova computing component includes database API service, HTTP request API service, cache API service, remote procedure call (Remote Procedure Call, RPC) API service, Schduler scheduling service API, and Compute computing service API; the cinder block storage service includes API service, scheduler scheduling service API, and Volume volume service API. The service API is a service API that all openstack components need to have. It is understandable that different tracing types correspond to different service APIs, and the tracing data of a specific tracing type can be obtained from the corresponding service application program interface. In other words, different tracing types obtain corresponding tracing data based on the corresponding service APIs contained in each component. For example, when using the service API of the nova computing component, the tracing types in the whole process are tracked for database calls, cache calls, remote procedure calls, and other component API service calls.

[0064] Furthermore, the tracking middleware 240 obtains the tracking data of the target cloud platform component according to the tracking type, and reports the tracking data of the target cloud platform component to the tracking application. Specifically, after determining the tracking type, the tracking middleware 240 obtains the tracking data of the target cloud platform component according to the tracking type, for example, from the service API. After obtaining the tracking data of the target cloud platform component, the tracking middleware 240 reports the tracking data of the target cloud platform component to the tracking application. Among them, the tracking middleware is the target middleware corresponding to the tracking application, and the tracking application is an end-to-end distributed tracking application, such as a jaeger distributed tracking application.

[0065] The tracking application 220 is used to save the tracking data of the target cloud platform component into a database and provide an interface for viewing the tracking data of the target cloud platform component.

[0066] Specifically, the tracking application 220 is used to save the tracking data of the target cloud platform component to the database, and provide an interface for viewing the tracking data of the target cloud platform component. More specifically, the tracking results after the middleware are displayed in the interface, for example, the following parameters are included: the tracking start time trace start, the interval time duration, the number of components monitored by the table service, and the tracking call depth number Depth; exemplarily, in a tracking, the client called the GET interface provided by nova-api. Because the interface used the cache, it made a memcache GET call. The call time was 1.06 milliseconds as shown in the figure. At the same time, the interface called other GET interfaces of its own nova-api, and the call time was 40.53 milliseconds. The interface called the GET request of the neutron component, which took 32.76 milliseconds. The interface used the cache memcache get, which took 1.24 milliseconds. The database was queried twice, and the sql select times were 0.8 milliseconds and 0.83 milliseconds respectively. It is understandable that the data interface is used to display the capabilities provided by the tracking service. For example, if a request takes a long time, it can be specifically determined which component or operation caused the long time. This troubleshooting capability can improve the observability and tracking of components, thereby improving the reliability of the cloud platform.

[0067] In the system provided in this embodiment, the tracking system includes a cloud platform and a tracking application. The cloud platform includes at least one cloud platform component and tracking middleware corresponding to each cloud platform component. The tracking middleware is a target middleware installed in the target cloud platform component. Among them, the tracking middleware 240 is used to determine the tracking type corresponding to the target cloud platform component; then obtain the tracking data of the target cloud platform component according to the tracking type, and report the tracking data of the target cloud platform component to the tracking application, wherein the tracking application is an end-to-end distributed tracking application, the tracking middleware is the target middleware corresponding to the tracking application, and the tracking application 220 is used to save the tracking data of the target cloud platform component to the database, and at the same time provide an interface for viewing the tracking data of the target cloud platform component.

[0068] The tracking middleware in the present invention is installed on the target cloud platform component. The tracking middleware obtains the tracking data of the target cloud platform component according to the tracking type corresponding to the target cloud platform component, and reports the tracking data of the target cloud platform component to the tracking application. The tracking application is an end-to-end distributed tracking application, and the tracking middleware is the target middleware corresponding to the tracking application. The tracking application provides an interface for viewing the tracking data of the target cloud platform component, thereby realizing the tracking of the observability of the cloud platform service.

[0069] Optionally, the tracking middleware is specifically used for: Determining a service application program interface for tracking the target cloud platform component according to a tracking type corresponding to the target cloud platform component; Writing a target call function into the service application program interface so that the service application program tracks the data of the target cloud platform component when running, and obtains the tracking data of the target cloud platform component; Reporting the tracking data of the target cloud platform component to the tracking application.

[0070] Specifically, in some embodiments, the process of the tracking middleware obtaining component tracking data and reporting it is implemented by the following steps: First, according to the tracking type corresponding to the target cloud platform component, determine the service application program interface for tracking the target cloud platform component. It can be understood that different tracking types correspond to different service application program interfaces (Application Programming Interface, API), and specific types of tracking data can be obtained from the corresponding service application program interface. Among them, the tracking type refers to which type of data is tracked, or what the acquired data itself is used for. For example, the main components of the openstack cloud platform include nova computing components, cinder block storage components, neutron network components, swift object storage components, heat orchestration components, etc. Each component has its own service application program interface API, and the service API is equivalent to the import and export of other services. For example, the nova computing component includes its own API service, Schduler scheduling service API, and Compute computing service API; the cinder block storage component includes API service, scheduler scheduling service API, and Volume volume service API. The service API is a service API that all openstack components need to have. Correspondingly, based on the tracking type, the service API contained in the component can be determined. Regarding the tracing type, for any component, the tracing type is, for example, the tracing of the component database, that is, database tracing; another example, the tracing type is the tracing of the component HTTP request, that is, HTTP request tracing; another example, the tracing type is the tracing of the component cache, that is, cache tracing; another example, the tracing type is the tracing of the component remote procedure call RPC, that is, remote procedure call tracing.

[0071] Furthermore, after the corresponding service API is determined, the target calling function can be written into the service API so that the data of the target cloud platform component can be tracked when the service application is running, thereby obtaining the tracking data of the target cloud platform component.

[0072] Furthermore, the tracking middleware can report the tracking data of the target cloud platform component to the tracking application. Among them, the tracking middleware is the target middleware corresponding to the tracking application, and can conveniently and quickly transmit data with the tracking application. For example, if the tracking application is a jaeger distributed tracking application, the tracking middleware is jaeger_middleware. For another example, if the tracking application is skywalking, the tracking middleware is skywalking_middleware. It can be understood that other applications that can be used for tracking can be used in the present invention, and this embodiment does not limit the types of tracking applications and tracking middleware.

[0073] In the system provided by this embodiment, the tracking middleware first determines the service application program interface for tracking the target cloud platform component according to the tracking type corresponding to the target cloud platform component; then, the tracking middleware writes the target call function in the service application program interface, so that the service application can track the data of the target cloud platform component when running, and obtain the tracking data of the target cloud platform component; then, the tracking middleware reports the tracking data of the target cloud platform component to the tracking application. This method realizes the tracking of the observability of cloud platform services through the middleware and the tracking application.

[0074] Figure 3 This is the second structural diagram of the tracking system of the cloud platform service provided by the present invention. Figure 3 As shown, the system includes: The openstack cloud platform and the jaeger distributed tracing application. The cloud platform includes the nova computing component, the neutron network component, the cinder block storage component, and the keystone authentication component. The middleware jaeger_middleware is installed in the nova computing component, the neutron network component, the cinder block storage component, and the keystone authentication component. For any cloud platform component, during the service tracing process, the middleware jaeger_middleware installed in the cloud platform component obtains the tracing data from the tracing middleware, and then reports the obtained tracing data to the jaeger distributed tracing application. After receiving the tracing data, the jaeger distributed tracing application stores the tracing data in the database and provides an interface for viewing the tracing data, such as a visualization interface.

[0075] The middleware in this system is installed on the cloud platform component. The middleware obtains the tracking data of the target cloud platform component and reports the obtained tracking data of the cloud platform component to the jaeger distributed tracking application. The jaeger distributed tracking application is an end-to-end distributed tracking application. The middleware jaeger_middleware is the middleware corresponding to the jaeger distributed tracking application. The jaeger distributed tracking application provides an interface for viewing the tracking data of the target cloud platform component, thereby realizing the tracking of the observability of the cloud platform service.

[0076] The tracking device for the cloud platform service provided by the present invention is described below. The tracking device for the cloud platform service described below and the tracking method for the cloud platform service described above can be referenced to each other.

[0077] Figure 4 is a schematic diagram of the structure of the tracking device for cloud platform services provided by the present invention, which is applied to the tracking middleware in the tracking system for cloud platform services, wherein the system includes a cloud platform and a tracking application, wherein the cloud platform includes at least one cloud platform component and the tracking middleware corresponding to each cloud platform component, wherein the tracking middleware is a target middleware installed in a target cloud platform component; Figure 4 As shown, the tracking device 400 of the cloud platform service includes: A determination module 410 is used to determine a tracking type corresponding to the target cloud platform component; The tracking module 420 is used to obtain the tracking data of the target cloud platform component according to the tracking type, and report the tracking data of the target cloud platform component to the tracking application; the tracking application is an end-to-end distributed tracking application, and the tracking middleware is the target middleware corresponding to the tracking application. The tracking data of the target cloud platform component is used for the tracking application to save the tracking data of the target cloud platform component to the database of the tracking application, and provide an interface for viewing the tracking data of the target cloud platform component.

[0078] The device provided in this embodiment is applied to the tracking middleware in the tracking system of the cloud platform service. The tracking system includes a cloud platform and a tracking application. The cloud platform includes at least one cloud platform component and the tracking middleware corresponding to each cloud platform component. The tracking middleware is the target middleware installed in the target cloud platform component. First, the determination module 410 determines the tracking type corresponding to the target cloud platform component. Then, the tracking module 420 obtains the tracking data of the target cloud platform component according to the tracking type, and reports the tracking data of the target cloud platform component to the tracking application, wherein the tracking application is an end-to-end distributed tracking application, the tracking middleware is the target middleware corresponding to the tracking application, and the tracking data of the target cloud platform component is used for the tracking application to save the tracking data of the target cloud platform component to the database of the tracking application, and provide an interface for viewing the tracking data of the target cloud platform component.

[0079] The tracking middleware in this device is installed on the target cloud platform component. The tracking middleware obtains the tracking data of the target cloud platform component according to the tracking type corresponding to the target cloud platform component, and reports the tracking data of the target cloud platform component to the tracking application. The tracking application is an end-to-end distributed tracking application, and the tracking middleware is the target middleware corresponding to the tracking application. The tracking application provides an interface for viewing the tracking data of the target cloud platform component, thereby realizing the tracking of the observability of the cloud platform service.

[0080] Optionally, the tracking module 420 is specifically configured to: Determining a service application program interface for tracking the target cloud platform component according to a tracking type corresponding to the target cloud platform component; Writing a target call function into the service application program interface so that the service application program tracks the data of the target cloud platform component when running, and obtains the tracking data of the target cloud platform component; Reporting the tracking data of the target cloud platform component to the tracking application.

[0081] Optionally, the tracing type includes at least one of the following: database tracing, HTTP request tracing, cache tracing, and remote procedure call tracing; Optionally, the tracking module 420 is further configured to: In the case where the tracking type is the database tracking, determining the database tool program interface of the target cloud platform component as the service application program interface included in the target cloud platform component; Writing an event monitoring function into the database tool program interface so that the database tool program tracks the database of the target cloud platform component when running, and obtains database tracking data of the target cloud platform component; In the case where the tracking type is HTTP request tracking, determining the HTTP request tool program interface of the target cloud platform component as the service application program interface included in the target cloud platform component; Writing a wrapper function into the HTTP request tool program interface so that the HTTP request tool program can track the HTTP request of the target cloud platform component when it is running, and obtain HTTP request tracking data of the target cloud platform component; In the case where the tracking type is cache tracking, determining the cache tool program interface of the target cloud platform component as the service application program interface included in the target cloud platform component; Writing a package function in the cache tool program interface so that the cache tool program can track the cache of the target cloud platform component when it is running, and obtain cache tracking data of the target cloud platform component; In the case where the tracing type is remote procedure call tracing, determining the remote procedure call tool program interface of the target cloud platform component as the service application program interface included in the target cloud platform component; Writing a package function into the remote procedure call tool program interface so that the remote procedure call tool program can track the remote procedure call of the target cloud platform component when it is running, and obtain the remote procedure call tracking data of the target cloud platform component; The tracking data of the target cloud platform component is determined based on the database tracking data, the HTTP request tracking data, the cache tracking data and the remote procedure call tracking data.

[0082] Optionally, the device further comprises: a deployment module; Optionally, the deployment module is used to: Installing the tracking middleware in the service running environment of the target cloud platform component; Adding the setting file of the tracking middleware and the deployment address and running service address of the tracking middleware to the configuration file of the target cloud platform component; The target cloud platform component is restarted to obtain the target cloud platform component on which the tracking middleware is installed.

[0083] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the tracking method of the cloud platform service, which is applied to the tracking middleware in the tracking system of the cloud platform service, the system includes a cloud platform and a tracking application, the cloud platform includes at least one cloud platform component and the tracking middleware corresponding to each of the cloud platform components, and the tracking middleware is the target middleware installed in the target cloud platform component; the method includes: Determine a tracking type corresponding to the target cloud platform component; The tracking data of the target cloud platform component is obtained according to the tracking type, and the tracking data of the target cloud platform component is reported to the tracking application; the tracking application is an end-to-end distributed tracking application, and the tracking middleware is the target middleware corresponding to the tracking application. The tracking data of the target cloud platform component is used for the tracking application to save the tracking data of the target cloud platform component into the database of the tracking application, and provide an interface for viewing the tracking data of the target cloud platform component.

[0084] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the 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 a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0085] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the cloud platform service tracking method provided by the above methods, and is applied to the tracking middleware in the tracking system of the cloud platform service, the system includes a cloud platform and a tracking application, the cloud platform includes at least one cloud platform component and the tracking middleware corresponding to each of the cloud platform components, the tracking middleware is a target middleware installed in a target cloud platform component; the method includes: Determine a tracking type corresponding to the target cloud platform component; The tracking data of the target cloud platform component is obtained according to the tracking type, and the tracking data of the target cloud platform component is reported to the tracking application; the tracking application is an end-to-end distributed tracking application, and the tracking middleware is the target middleware corresponding to the tracking application. The tracking data of the target cloud platform component is used for the tracking application to save the tracking data of the target cloud platform component into the database of the tracking application, and provide an interface for viewing the tracking data of the target cloud platform component.

[0086] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the cloud platform service tracking method provided by the above methods, and is applied to a tracking middleware in a cloud platform service tracking system, wherein the system includes a cloud platform and a tracking application, the cloud platform includes at least one cloud platform component and the tracking middleware corresponding to each of the cloud platform components, and the tracking middleware is a target middleware installed in a target cloud platform component; the method includes: Determine a tracking type corresponding to the target cloud platform component; The tracking data of the target cloud platform component is obtained according to the tracking type, and the tracking data of the target cloud platform component is reported to the tracking application; the tracking application is an end-to-end distributed tracking application, and the tracking middleware is the target middleware corresponding to the tracking application. The tracking data of the target cloud platform component is used for the tracking application to save the tracking data of the target cloud platform component into the database of the tracking application, and provide an interface for viewing the tracking data of the target cloud platform component.

[0087] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0088] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A cloud platform service tracking method, characterized in that: The method is applied to the tracking middleware in the tracking system of the cloud platform service, the system includes a cloud platform and a tracking application, the cloud platform includes at least one cloud platform component and the tracking middleware corresponding to each cloud platform component, and the tracking middleware is a target middleware installed in a target cloud platform component; the method includes: Determine a tracking type corresponding to the target cloud platform component; The tracking data of the target cloud platform component is obtained according to the tracking type, and the tracking data of the target cloud platform component is reported to the tracking application; the tracking application is an end-to-end distributed tracking application, and the tracking middleware is the target middleware corresponding to the tracking application. The tracking data of the target cloud platform component is used for the tracking application to save the tracking data of the target cloud platform component into the database of the tracking application, and provide an interface for viewing the tracking data of the target cloud platform component.

2. The cloud platform service tracking method according to claim 1, characterized in that: The acquiring the tracking data of the target cloud platform component according to the tracking type, and reporting the tracking data of the target cloud platform component to the tracking application, includes: Determining a service application program interface for tracking the target cloud platform component according to a tracking type corresponding to the target cloud platform component; Writing a target call function into the service application program interface so that the service application program tracks the data of the target cloud platform component when running, and obtains the tracking data of the target cloud platform component; Reporting the tracking data of the target cloud platform component to the tracking application.

3. The cloud platform service tracking method according to claim 1, characterized in that: The tracing type includes at least one of the following: database tracing, HTTP request tracing, cache tracing, and remote procedure call tracing; the obtaining the tracing data of the target cloud platform component according to the tracing type and reporting the tracing data of the target cloud platform component to the tracing application includes: In the case where the tracking type is the database tracking, determining the database tool program interface of the target cloud platform component as the service application program interface included in the target cloud platform component; Writing an event monitoring function into the database tool program interface so that the database tool program tracks the database of the target cloud platform component when running, and obtains database tracking data of the target cloud platform component; In the case where the tracking type is HTTP request tracking, determining the HTTP request tool program interface of the target cloud platform component as the service application program interface included in the target cloud platform component; Writing a wrapper function into the HTTP request tool program interface so that the HTTP request tool program can track the HTTP request of the target cloud platform component when it is running, and obtain HTTP request tracking data of the target cloud platform component; In the case where the tracking type is cache tracking, determining the cache tool program interface of the target cloud platform component as the service application program interface included in the target cloud platform component; Writing a package function in the cache tool program interface so that the cache tool program can track the cache of the target cloud platform component when it is running, and obtain cache tracking data of the target cloud platform component; In the case where the tracing type is remote procedure call tracing, determining the remote procedure call tool program interface of the target cloud platform component as the service application program interface included in the target cloud platform component; Writing a package function into the remote procedure call tool program interface so that the remote procedure call tool program can track the remote procedure call of the target cloud platform component when it is running, and obtain the remote procedure call tracking data of the target cloud platform component; The tracking data of the target cloud platform component is determined based on the database tracking data, the HTTP request tracking data, the cache tracking data and the remote procedure call tracking data.

4. The cloud platform service tracking method according to any one of claims 1 to 3, characterized in that: Before determining the tracking type corresponding to the target cloud platform component, the method further includes: Installing the tracking middleware in the service running environment of the target cloud platform component; Adding the setting file of the tracking middleware and the deployment address and running service address of the tracking middleware to the configuration file of the target cloud platform component; The target cloud platform component is restarted to obtain the target cloud platform component on which the tracking middleware is installed.

5. A tracking system for cloud platform services, the system comprising a cloud platform and a tracking application, the cloud platform comprising at least one cloud platform component and a tracking middleware corresponding to each of the cloud platform components, the tracking middleware being a target middleware installed in a target cloud platform component; The tracking middleware is used to determine the tracking type corresponding to the target cloud platform component; Acquire the tracking data of the target cloud platform component according to the tracking type, and report the tracking data of the target cloud platform component to the tracking application; The tracking application is an end-to-end distributed tracking application; the tracking middleware is a target middleware corresponding to the tracking application; The tracking application is used to save the tracking data of the target cloud platform component into a database and provide an interface for viewing the tracking data of the target cloud platform component.

6. The cloud platform service tracking system according to claim 5, characterized in that: The tracking middleware is specifically used for: Determining a service application program interface for tracking the target cloud platform component according to a tracking type corresponding to the target cloud platform component; Writing a target call function into the service application program interface so that the service application program tracks the data of the target cloud platform component when running, and obtains the tracking data of the target cloud platform component; Reporting the tracking data of the target cloud platform component to the tracking application.

7. A tracking device for cloud platform services, applied to tracking middleware in a tracking system for cloud platform services, the system comprising a cloud platform and a tracking application, the cloud platform comprising at least one cloud platform component and the tracking middleware corresponding to each cloud platform component, the tracking middleware being a target middleware installed in a target cloud platform component; the device comprising: A determination module, used to determine the tracking type corresponding to the target cloud platform component; A tracking module, configured to obtain tracking data of the target cloud platform component according to the tracking type, and report the tracking data of the target cloud platform component to the tracking application; The tracking application is an end-to-end distributed tracking application, the tracking middleware is the target middleware corresponding to the tracking application, and the tracking data of the target cloud platform component is used for the tracking application to save the tracking data of the target cloud platform component into the database of the tracking application, and provide an interface for viewing the tracking data of the target cloud platform component.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for tracking the cloud platform service according to any one of claims 1 to 4 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for tracking cloud platform services as described in any one of claims 1 to 4 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for tracking cloud platform services as described in any one of claims 1 to 4 is implemented.

Citation Information

Cited By

  • Full-link tracking method and system based on APM

    CN119226118A