An observation method, device and storage medium of an application program

By overlaying program instructions onto container images, the observation tools are automatically connected, solving the problem of complex manual operations during application observation in containers and achieving automated observation access without manual intervention.

CN115576640BActive Publication Date: 2026-07-10ALIBABA (CHINA) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIBABA (CHINA) CO LTD
Filing Date
2022-09-08
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

During the observation of applications running in containers, a large number of complex manual operations are required to connect to the detection tools, resulting in a high learning cost for users.

Method used

By acquiring the container image of the application, overlaying the first program instruction for invoking the target observation tool and the second program instruction for configuring the startup configuration items, and packaging them into a new image, the application can autonomously access the target observation tool during operation, thereby achieving automated observation.

Benefits of technology

It enables a flexible, transparent, and automated observation access method, eliminating the manual operation costs on the user side and simplifying the observation process of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115576640B_ABST
    Figure CN115576640B_ABST
Patent Text Reader

Abstract

This application provides an application observation method, device, and storage medium. A container image corresponding to the application can be obtained; a first program instruction for invoking a target observation tool and a second program instruction for configuring the startup configuration items required for the target observation tool are superimposed on the container image; and the container image, the first program instruction, and the second program instruction are packaged into a new image. Thus, the new image will possess both the functions of invoking the target observation tool and configuring the startup configuration items required for the target observation tool. By publishing the new image of the application, the application automatically acquires these two capabilities, allowing the application to autonomously access the target observation tool and initiate observation during runtime without any manual operation. This achieves a flexible, transparent, and automated observation access method, eliminating the manual access costs on the user side.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to a method, device and storage medium for observing an application. Background Technology

[0002] With the continuous development of cloud-native technologies, application architectures are gradually shifting from monolithic systems to microservices, and container management platforms are being increasingly accepted by enterprises. Meanwhile, observability has become a fundamental infrastructure of cloud-native computing. An observability solution refers to the systematic measurement of a user's infrastructure, platform, and applications through real-time and near-real-time tracking, log, and / or metric data collection and analysis using monitoring tools. This allows for a comprehensive, data-driven understanding of how these systems operate, and further, the collection of feedback to build a closed-loop solution for continuous optimization.

[0003] Currently, monitoring applications running in containers requires numerous and complex manual steps to integrate the application with the monitoring tools. This results in significant learning costs and places a burden on users. Summary of the Invention

[0004] This application provides several aspects of an application observation, device, and storage medium for enabling automated observation of applications running in containers.

[0005] This application provides an observation method for an application, including:

[0006] Get the container image corresponding to the application;

[0007] Based on the access information corresponding to the target observation tool that the application needs to access, a first program instruction for invoking the target observation tool is superimposed on the container image;

[0008] Based on the startup configuration items required to start the target observation tool, a second program instruction for configuring the startup configuration items is superimposed on the container image;

[0009] Package the container image, the first program instruction, and the second program instruction into a new image;

[0010] The new image is released so that the application can autonomously access the target observation tool and start observation during operation.

[0011] Furthermore, the method also includes:

[0012] The container image is parsed to determine the application type corresponding to the application.

[0013] Based on the mapping relationship between application type and observation tool, find the target observation tool that is compatible with the application.

[0014] Furthermore, parsing the container image to determine the application type corresponding to the application includes:

[0015] The container image is parsed to determine the language category used by the application;

[0016] The application type is determined based on the language category used by the application.

[0017] Furthermore, the application types include Go, Python, Ruby, Java, Rust, .NET, or PHP language classes.

[0018] Furthermore, the method also includes:

[0019] Based on the association between the observation tool and the startup configuration items, the startup configuration items required for the target observation tool are determined.

[0020] Furthermore, the startup configuration items include one or more of the following: image execution entry configuration items, environment variable configuration items, and command line configuration items.

[0021] Furthermore, obtaining the container image corresponding to the application includes pulling the container image corresponding to the application from the image repository based on the pre-obtained image pull permission;

[0022] Publishing the new image includes uploading the new image to the image repository.

[0023] Furthermore, the method also includes:

[0024] If the application uses a Kubernetes architecture, then determine the configuration items in the configuration file of the Kubernetes architecture that are related to the application and the target observation tool;

[0025] Configure the relevant configuration items to enable the Kubernetes architecture to support the application's access to the target observation tool.

[0026] Furthermore, the step of overlaying a first program instruction for invoking the target observation tool onto the container image based on the access information corresponding to the target observation tool required by the application includes:

[0027] Construct a call function for the target observation tool;

[0028] Configure the access information corresponding to the target observation tool in the trigger function;

[0029] Based on the invocation function and the access information, the first program instruction is constructed.

[0030] Furthermore, the step of packaging the container image, the first program instruction, and the second program instruction into a new image includes:

[0031] A new image layer is superimposed on the container image, the image layer being used to carry the first program instructions and the second program instructions;

[0032] The container image and the image layer are packaged into the new image.

[0033] This application also provides a computing device, including a memory, a processor, and a communication component;

[0034] The memory is used to store one or more computer instructions;

[0035] The processor is coupled to the memory and the communication component, and is used to execute the one or more computer instructions for:

[0036] The container image corresponding to the application is obtained through the communication component.

[0037] Based on the access information corresponding to the target observation tool that the application needs to access, a first program instruction for invoking the target observation tool is superimposed on the container image;

[0038] Based on the startup configuration items required to start the target observation tool, a second program instruction for configuring the startup configuration items is superimposed on the container image;

[0039] Package the container image, the first program instruction, and the second program instruction into a new image;

[0040] The new image is released so that the application can autonomously access the target observation tool and start observation during operation.

[0041] This application also provides a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, causes the one or more processors to execute the aforementioned application program, and an observation method thereof.

[0042] In this embodiment, a modular, service-oriented observation function injection product is provided, which can obtain the container image corresponding to the application; superimpose a first program instruction for invoking the target observation tool and a second program instruction for configuring the startup configuration items required by the target observation tool on the container image; and package the container image, the first program instruction, and the second program instruction into a new image. Thus, the new image will possess both the ability to invoke the target observation tool and the ability to configure the startup configuration items required by the target observation tool. By publishing the new image of the application, the application can automatically acquire the ability to invoke the target observation tool and configure the startup configuration items required by the target observation tool, allowing the application to autonomously access the target observation tool and start observation during runtime without any manual operation. This achieves a flexible, transparent, and automated observation access method, eliminating the manual access cost on the user side. Attached Figure Description

[0043] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0044] Figure 1 A flowchart illustrating an observation method for an application provided as an exemplary embodiment of this application;

[0045] Figure 2 A logical schematic diagram of an observation method for an application provided as an exemplary embodiment of this application;

[0046] Figure 3 A flowchart illustrating an application publishing process provided as an exemplary embodiment of this application;

[0047] Figure 4 This is a schematic diagram of the structure of a computing device provided for another exemplary embodiment of this application. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0049] Currently, application monitoring requires users to perform numerous and complex manual operations to access detection tools. To address this, some embodiments of this application provide a modular, service-oriented monitoring function injection product. This product can obtain the container image corresponding to the application; superimpose a first program instruction for invoking the target monitoring tool and a second program instruction for configuring the startup configuration items required by the target monitoring tool onto the container image; and package the container image, the first program instruction, and the second program instruction into a new image. This new image will possess both the ability to invoke the target monitoring tool and the ability to configure the startup configuration items required by the target monitoring tool. By publishing the new image of the application, the application automatically acquires the ability to invoke the target monitoring tool and configure the startup configuration items required by the target monitoring tool, allowing the application to autonomously access the target monitoring tool and initiate monitoring during runtime without any manual operation. This achieves a flexible, transparent, and automated monitoring access method, eliminating the manual access costs on the user side.

[0050] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0051] Figure 1 A flowchart illustrating the observation method of an application provided as an exemplary embodiment of this application. Figure 2 A logical schematic diagram of an observation method for an application provided as an exemplary embodiment of this application. (Reference) Figure 1 The method may include:

[0052] Step 100: Obtain the container image corresponding to the application;

[0053] Step 101: Based on the access information corresponding to the target observation tool required by the application, overlay the first program instruction for invoking the target observation tool onto the container image;

[0054] Step 102: Based on the startup configuration items required to start the target observation tool, overlay the second program instructions for configuring the startup configuration items onto the container image;

[0055] Step 103: Package the container image, the first program instruction, and the second program instruction into a new image;

[0056] Step 104: Publish a new image so that the application can autonomously access the target observation tool and start observation during runtime.

[0057] The application observation method provided in this embodiment is applicable to cloud computing scenarios and can automatically observe applications running in containers without any manual configuration. The application observation work in this embodiment may include, but is not limited to, performance analysis and optimization, anomaly detection, etc. The application observation solution provided in this embodiment can be practically applied to SaaS products such as public cloud cluster performance analysis and optimization; however, this embodiment is not limited to this.

[0058] In addition, in this embodiment, it can be Figure 1 The observation logic of the provided application can be modularized or serviced to create products in the form of independently usable modules, services, or plugins. (Reference) Figure 2 The product provided in this embodiment can be used by users, thereby enabling users' applications to independently access suitable observation tools.

[0059] In this embodiment, a profiler can be used to support application observation. Profilers can use a wide range of techniques to collect data, including but not limited to hardware interrupts, code instructions, operating system hooking, and CPU-built-in performance counter registers. The purpose of application observation is to determine which parts of the application should be optimized to improve application speed or memory usage efficiency. Application observation can be event-based, sampling-based, instruction-driven, or simulation-based; no specific limitations are imposed here.

[0060] In this embodiment, the flexible mechanisms of cloud-native technologies can be fully utilized to design a flexible and transparent way to access and observe application tools. Representative cloud-native technologies include containers, service meshes, immutable infrastructure, and declarative APIs. These technologies enable organizations to build and run elastically scalable applications in new dynamic environments such as public, private, and hybrid clouds. In this document, these applications are referred to as application programs.

[0061] In this embodiment, the application runs in a container, which is deployed on a cloud server. Typically, one or more containers can be deployed on a single cloud server. The process of integrating and running an application into a container is called "containerizing," sometimes also referred to as "Dockerization." Containers are designed for applications, simplifying the building, deployment, and execution of applications. A container is a lightweight application code package containing dependencies, such as specific versions of programming language runtimes and libraries required to run software services. Containers support easy sharing of CPU, memory, storage, and network resources at the operating system level and provide a logical packaging mechanism that allows applications packaged in this way to operate independently of their actual runtime environment. Containers greatly improve workload portability, enabling them to run virtually anywhere, significantly reducing development and deployment workloads, such as on Linux, Windows, and Mac operating systems; on virtual machines or physical servers; on developers' machines or machines in local data centers; and on public clouds. Containers offer a more lightweight operating method than virtual machines, as they perform virtualization at the operating system level, while virtual machines perform virtualization at the hardware level. Additionally, a container image is a standard containerization deliverable used to package an application and its dependent environments. In the containerization process described above, an application can be built into a container image based on a Dockerfile and uploaded to a container image repository. Users can then pull the container image and start the container in a test or production environment to run the application.

[0062] In this embodiment, the user can pre-create the container image corresponding to the application. Figure 3 A flowchart illustrating an application publishing process provided as an exemplary embodiment of this application is shown below. Figure 3 The development environment during the release process may include:

[0063] 1. Develop application programs

[0064] a. Develop application program code

[0065] b. Compile, debug, and test the application program. Once verified, proceed to the build stage.

[0066] 2. Build the container image

[0067] a. Compile the application program (convert the code written in the development environment into a release package that can run and provide services in the production environment through compilation and assembly steps. This process may include pre-compilation, syntax checking, lexical checking, dependency handling, file merging, file compression, unit testing, version management, etc.)

[0068] b. Test the application program; if the test fails, return to the development stage.

[0069] c. Package the compilation results into the image to obtain the container image corresponding to the application.

[0070] 3. Upload the container image to the image repository. At this point, the application is ready for release.

[0071] refer to Figure 3 The application observation method provided in this embodiment can be applied after the user uploads the application's container image to the image repository, that is, after the development phase is completed. (Reference) Figure 2 In the observation scheme of the application provided in this embodiment, the container image uploaded by the user to the image repository can be used as the basis to give the application the ability to invoke the target observation tool and configure the startup configuration items required for the target observation tool.

[0072] Therefore, refer to Figure 1 In step 100, the container image corresponding to the application can be obtained. In practical applications, the container image corresponding to the application can be pulled from the image repository based on the pre-obtained image pull permission. For user scenarios using container-level cloud-native applications, the user can subscribe to the product provided in this embodiment to obtain image pull permission. For user scenarios deploying applications on ECS or independent private deployments, in addition to granting image pull permission to the product provided in this embodiment, the user also needs to grant necessary permissions such as operating system environment permissions and file system permissions. These user scenarios are only exemplary. In different user scenarios, users can grant appropriate levels of permissions to the product provided in this embodiment as needed to ensure that image pull permission can be obtained in step 100.

[0073] After obtaining the container image, in steps 101 and 102, program instructions can be overlaid on the container image to give the application the ability to invoke the target observation tool and configure the startup configuration items required for the target observation tool.

[0074] refer to Figure 1In step 101, based on the access information corresponding to the target observation tool required by the application, a first program instruction for invoking the target observation tool can be superimposed on the container image. In one exemplary scheme: a call-up function for the target observation tool can be constructed; the access information corresponding to the target observation tool can be configured in the call-up function; and a first program instruction can be constructed based on the call-up function and the access information. Thus, the functional logic for invoking the target observation tool can be carried by one or more computer program instructions, and these program instructions can be superimposed on the container image corresponding to the application. That is, in this embodiment, by superimposing the first program instruction on the container image, the function of invoking the target observation tool can be superimposed on the container image corresponding to the application.

[0075] Here, various implementation methods can be used to determine the target observation tools that the application needs to access. In one exemplary implementation: the container image can be parsed to determine the application type corresponding to the application; based on the mapping relationship between the application type and the observation tool, the target observation tool adapted to the application can be found. In this exemplary implementation, the container image can be parsed to determine the language category used by the application; based on the language category used by the application, the corresponding application type can be determined. The application type may include, but is not limited to, languages ​​such as Go, Python, Ruby, Java, Rust, .NET, or PHP. Accordingly, automatic detection and parsing techniques can be used to accurately determine the application type.

[0076] The following are some exemplary mapping relationships between application types and observation tools:

[0077] Application type Observation tools Go language classes Pprof tool Python language classes py-spy tool Ruby language classes Rbspy tools Java Language Classes async-profiler tool Rust language classes pprof-rs tool .NET Language Classes dotnet trace tool

[0078] It should be understood that the above mapping relationships are merely exemplary, and this embodiment is not limited thereto, nor will it be exhaustive.

[0079] In this way, a suitable observation tool can be automatically selected for the application as the target observation tool that the application needs to access, eliminating the need for manual configuration or pre-specification by the user. After selecting the target observation tool, the access information corresponding to the target observation tool can be configured in the first program instruction. In this embodiment, the access information corresponding to the target observation tool may include, but is not limited to, its name, access address, etc. Therefore, based on the access information configured in the first program instruction, the executable file of the target observation tool can be accessed by running the first program instruction. Based on this ingenious design concept provided by this embodiment, the constraint on the storage location of the executable file of the target observation tool can be eliminated. It is no longer necessary to manually download the executable file of the target observation tool to the local machine, nor is it necessary to manually store the executable file of the target observation tool in a specified file directory. That is, in this embodiment, the executable file of the target observation tool can be stored in any storage location as needed, and it can be accessed simply by specifying the correct access address in the first program instruction.

[0080] Continue to refer to Figure 1 In step 102, based on the startup configuration items required to launch the target observation tool, a second program instruction for configuring the startup configuration items can be superimposed on the container image. In one exemplary scheme: a configuration function for the startup configuration items required for the target observation tool can be constructed; based on the configuration function, a first program instruction is constructed. In this way, the functional logic for configuring the startup configuration items required for the target observation tool can be carried by one or more computer instructions, and these program instructions can be superimposed on the container image corresponding to the application. That is, in this embodiment, by superimposing the second program instruction on the container image, the function of configuring the startup configuration items required for the target observation tool can be superimposed on the container image corresponding to the application.

[0081] Different observation tools may require different startup configuration items. In this embodiment, the association between the observation tool and the startup configuration items can be pre-configured. Thus, in step 102, the startup configuration items required for the target observation tool can be determined based on the association between the observation tool and the startup configuration items. In this embodiment, startup configuration items may include, but are not limited to, execution entry configuration items, environment variable configuration items, or command-line configuration items. These are all configuration items that are typically required for starting an observation tool, and will not be explained in detail here. In practical applications, the association between the observation tool and the startup configuration items can be pre-built based on prior knowledge; moreover, this association can be dynamically updated to adapt to the constantly increasing or decreasing number of observation tools and the ever-changing startup requirements.

[0082] Furthermore, it should be understood that, given the application to be observed and the startup configuration items required by the target observation tool, the parameter values ​​to be assigned to each startup configuration item can be determined in step 102, and these determined parameter values ​​can configure each startup configuration item. These include, but are not limited to:

[0083] 1. Modify the application configuration items required to enable the target observation tool (including the aforementioned execution entry configuration items, etc. The execution entry is the access address of the current application. Therefore, it can automatically read the execution entry of the container image---i.e., the access address, and assign the parameter value of the execution entry configuration item to the access address of the current application).

[0084] 2. Modify the environment variable configuration items required to enable the target observation tool.

[0085] 3. Modify the command-line configuration items required to enable the target observation tool.

[0086] In one exemplary practical application, a configuration file can be maintained for the target observation tool to carry its startup configuration items. This configuration file can store information related to the software, including configuration parameters and command-line arguments, such as initialization information, initial paths, and account details, facilitating program portability. Common formats include ini, json, and key-valve pairs. Thus, the second program instruction can be used to configure the target observation tool's configuration file.

[0087] Therefore, a container image stacking mechanism can be used to enhance the container image corresponding to the application. (Reference) Figure 1 After completing the overlay of the first and second program instructions, in step 103, the container image, the first program instructions, and the second program instructions are packaged into a new image. This new image not only retains the original content of the container image corresponding to the application but also adds the functionality of launching the target observation tool and configuring the startup configuration items required for the target observation tool. Typically, a container image consists of a series of layers, which are called image layers. In an optional implementation, a new image layer can be added to the container image, and the first and second program instructions can be carried by the newly added image layer. The number of newly added image layers is not limited here; in practical applications, the number of image layers needed can be determined based on the number of image layers required by the first and second program instructions. The newly added image layer can be deployed on top of the container image; however, this embodiment does not limit this. In this optional implementation, in step 103, the container image and the newly added image layer can be packaged to obtain a new image.

[0088] Based on this, in step 104, a new image corresponding to the application can be published. Specifically, the new image can be uploaded to the image repository. The application will use the new image as the basis for its release and deployment.

[0089] Then, the application can be published based on the new image corresponding to the application. In this way, the new image can be pulled to start the application's container, and the target observation tool can be automatically connected during the application's operation, triggering the target observation tool to observe the application.

[0090] The application observation scheme provided in this embodiment can be applied to user scenarios using Kubernetes. Therefore, in this embodiment, if the application uses a Kubernetes architecture, the configuration items related to the application and the target observation tool in the configuration file of the Kubernetes architecture are determined; these configuration items are configured to enable the Kubernetes architecture to support the application's access to the target observation tool. The configuration file in the Kubernetes user scenario can be a YAML file. Of course, besides using the product provided in this embodiment to support automatic application observation in Kubernetes user scenarios, other design schemes can also be used to achieve this goal. For example, the user only needs to add the configuration to the YAML file (where YAML is a language specifically used for writing configuration files, and a YAML file is a special type of configuration file with either a .yaml or .yml extension), that is, to incorporate the container image overlay mechanism mentioned earlier into the YAML file. Alternatively, a plugin can be used to automatically attach the container with the performance monitoring and analysis process to the namespace of the target container where the application resides. This allows for direct use without requiring the user to modify the configuration in the YAML file, enabling the use of relevant monitoring tools without any changes to the application itself, and eliminating the need for extensive application configuration modifications on the user's side.

[0091] In summary, this embodiment extracts the non-standardized installation and configuration process of observation tools into a standard workflow and automates this process. Users can enable their applications to have observation capabilities without manual operation. This is a significant improvement in product experience for software products targeting cloud customers, helping users avoid the burden of making numerous application configuration changes when accessing cloud application operation and maintenance products (such as the observation tools mentioned in this embodiment). The transparent access method in this embodiment is achieved through techniques such as "enhancing the application's container image using an image overlay mechanism - reading the image's execution entry point and configuration and modifying it - adopting automatic detection and parsing technology to use different observation tools and configuration items according to the user's application type." Therefore, this embodiment provides a modular, service-oriented observation function injection product that can obtain the container image corresponding to the application; overlay a first program instruction for launching the target observation tool and a second program instruction for configuring the startup configuration items required for the target observation tool on top of the container image; and package the container image, the first program instruction, and the second program instruction into a new image. Thus, the new image will have both the functionality of launching the target observation tool and configuring the startup configuration items required for the target observation tool. By releasing a new image of the application, the application automatically gains the ability to invoke the target observation tool and configure the necessary startup settings. This allows the application to autonomously connect to the target observation tool and initiate observations during runtime, eliminating the need for any manual intervention. This achieves a flexible, transparent, and automated observation access method, eliminating the manual access costs on the user side.

[0092] It should be noted that some processes described in the above embodiments and accompanying drawings include multiple operations appearing in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear in this document, or they may be executed in parallel. The operation numbers, such as 101, 102, etc., are merely used to distinguish different operations and do not represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should also be noted that the descriptions such as "first" and "second" in this document are used to distinguish different program instructions, and do not represent a sequential order, nor do they limit "first" and "second" to different types.

[0093] Figure 4 This is a schematic diagram of the structure of a computing device provided for another exemplary embodiment of this application. For example... Figure 4 As shown, the computing device includes: a memory 40, a processor 41, and a communication component 42.

[0094] Processor 41, coupled to memory 40 and communication component 42, is used to execute computer programs in memory 40 for:

[0095] Obtain the container image corresponding to the application through communication component 42;

[0096] Based on the access information corresponding to the target observation tool required by the application, the first program instruction for invoking the target observation tool is superimposed on the container image;

[0097] Based on the startup configuration items required to launch the target observation tool, a second program instruction for configuring the startup configuration items is superimposed on the container image;

[0098] Package the container image, the first program instruction, and the second program instruction into a new image;

[0099] Release a new image so that the application can autonomously connect to the target observation tool and start observation during runtime.

[0100] In an alternative embodiment, processor 41 may also be used for:

[0101] Analyze the container image to determine the application type corresponding to the application;

[0102] Based on the mapping relationship between application type and observation tool, find the target observation tool that is compatible with the application.

[0103] In an optional embodiment, the processor 41, during the process of parsing the container image to determine the application type corresponding to the application, may:

[0104] Analyze the container image to determine the language category used by the application;

[0105] Determine the application type based on the language category used by the application.

[0106] In one alternative embodiment, the application type includes Go language classes, Python language classes, Ruby language classes, Java language classes, Rust language classes, .NET language classes, or PHP language classes.

[0107] In an alternative embodiment, processor 41 may also be used for:

[0108] Based on the relationship between the observation tool and the startup configuration items, determine the startup configuration items required for the target observation tool.

[0109] In one optional embodiment, the startup configuration items include one or more of the following: image execution entry configuration items, environment variable configuration items, and command line configuration items.

[0110] In an optional embodiment, during the process of obtaining the container image corresponding to the application, the processor 41 can be used to pull the container image corresponding to the application from the image repository based on the pre-obtained image pull permission;

[0111] It can be used to upload new images to the image repository during the process of releasing a new image.

[0112] In an optional embodiment, the processor 41 may also be used to: if the application uses a Kubernetes architecture, determine configuration items in the configuration file of the Kubernetes architecture that are related to the application and the target observation tool;

[0113] Configure the relevant configuration items to enable the Kubernetes architecture to support application access to target observation tools.

[0114] In an optional embodiment, during the process of superimposing a first program instruction for invoking the target observation tool onto the container image based on the access information corresponding to the target observation tool required by the application, the processor 41 can be used to:

[0115] Construct a call function for the target observation tool;

[0116] Configure the access information corresponding to the target observation tool in the invocation function;

[0117] Based on the invocation function, construct the first program instructions.

[0118] In an optional embodiment, during the process of packaging the container image, the first program instructions, and the second program instructions into a new image, the processor 41 can be used for:

[0119] A new image layer is overlaid on the container image, and the image layer is used to carry the first program instructions and the second program instructions.

[0120] Package the container image and image layers into a new image.

[0121] In one alternative embodiment, the application runs in a container, which resides on a cloud server.

[0122] Furthermore, such as Figure 4 As shown, the computing device also includes other components such as a power supply component 43. Figure 4 The diagram only shows some components and does not mean that the computing device includes only these components. Figure 4 The components shown.

[0123] It is worth noting that the technical details of the above embodiments of the computing device can be referred to the relevant descriptions in the foregoing method embodiments. To save space, they will not be repeated here, but this should not cause any loss to the scope of protection of this application.

[0124] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed, can perform the steps that can be executed by a computing device in the above method embodiments.

[0125] The above Figure 4 The memory in a computer is used to store computer programs and can be configured to store various other data to support operation on a computing platform. Examples of this data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc. The memory can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disks, or optical disks.

[0126] The above Figure 4 The communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA) technology, Ultra-Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0127] The above Figure 4 The power supply component provides power to the various components of the device in which it resides. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which it resides.

[0128] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0129] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0130] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0131] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0132] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0133] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0134] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0135] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0136] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. An observation method for an application, comprising: Get the container image corresponding to the application; Based on the access information corresponding to the target observation tool that the application needs to access, a first program instruction for invoking the target observation tool is superimposed on the container image; Based on the startup configuration items required to start the target observation tool, a second program instruction for configuring the startup configuration items is superimposed on the container image; Package the container image, the first program instruction, and the second program instruction into a new image; The new image is released so that the application can autonomously access the target observation tool and start observation during operation.

2. The method according to claim 1, further comprising: The container image is parsed to determine the application type corresponding to the application. Based on the mapping relationship between application type and observation tool, find the target observation tool that is compatible with the application.

3. The method according to claim 2, wherein parsing the container image to determine the application type corresponding to the application includes: The container image is parsed to determine the language category used by the application; The application type is determined based on the language category used by the application.

4. The method according to claim 2, wherein the application type includes GO language classes, Python language classes, Ruby language classes, Java language classes, Rust language classes, .NET language classes, or PHP language classes.

5. The method according to claim 1, further comprising: Based on the association between the observation tool and the startup configuration items, the startup configuration items required for the target observation tool are determined.

6. The method according to claim 1, wherein the startup configuration items include: One or more of the following: the image's execution entry configuration item, environment variable configuration item, and command line configuration item.

7. The method according to claim 1, wherein obtaining the container image corresponding to the application includes pulling the container image corresponding to the application from the image repository based on the pre-obtained image pull permission; The release of the new image includes, The new image is uploaded to the image repository.

8. The method according to claim 1, further comprising: If the application uses a Kubernetes architecture, then determine the configuration items in the configuration file of the Kubernetes architecture that are related to the application and the target observation tool; Configure the relevant configuration items to enable the Kubernetes architecture to support the application's access to the target observation tool.

9. The method according to claim 1, wherein the step of superimposing a first program instruction for invoking the target observation tool onto the container image based on the access information corresponding to the target observation tool required by the application includes: Construct a call function for the target observation tool; Configure the access information corresponding to the target observation tool in the invocation function; Based on the invocation function and the access information, the first program instruction is constructed.

10. The method according to claim 1, wherein packaging the container image, the first program instructions, and the second program instructions into a new image comprises: A new image layer is superimposed on the container image, the image layer being used to carry the first program instructions and the second program instructions; The container image and the image layer are packaged into the new image.

11. The method according to claim 1, wherein the application runs in a container located in a cloud server.

12. A computing device, comprising a memory, a processor, and communication components; The memory is used to store one or more computer instructions; The processor is coupled to the memory and the communication component, and is used to execute the one or more computer instructions for: The container image corresponding to the application is obtained through the communication component. Based on the access information corresponding to the target observation tool that the application needs to access, a first program instruction for invoking the target observation tool is superimposed on the container image; Based on the startup configuration items required to start the target observation tool, a second program instruction for configuring the startup configuration items is superimposed on the container image; Package the container image, the first program instruction, and the second program instruction into a new image; The new image is released so that the application can autonomously access the target observation tool and start observation during operation.

13. A computer-readable storage medium storing computer instructions that, when executed by one or more processors, cause the one or more processors to perform the observation method of the application program according to any one of claims 1-10.