Error snapshot generation for debugging application programming interface call
The system generates comprehensive API error snapshots to accurately reproduce execution conditions in large-scale distributed systems, enabling precise error diagnosis and reducing debugging time.
Patent Information
- Application Number
- PCT/EP2026/061931
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-05-23
- Filing Date
- 2026-04-24
- Publication Date
- 2026-11-26
Smart Images

Figure EP2026061931_26112026_PF_FP_ABST
Abstract
Description
ERROR SNAPSHOT GENERATION FOR DEBUGGING APPLICATION PROGRAMMING INTERFACE CALLBACKGROUND
[0001] The disclosure relates to application programming interface (API) calls and more particularly, to debugging the API calls.
[0002] Large-scale distributed systems are integral for handling extensive data processing and high-throughput computational tasks. The large-scale distributed systems include multiple interconnected components, including microservices, databases, and application programming interfaces (APIs), operating across diverse servers and geographic regions. Ensuring reliability and performance within large-scale distributed systems necessitates continuous monitoring and systematic analysis of system behavior. To maintain the operational integrity of the large-scale distributed systems, debugging plays a vital role by enabling the identification of anomalies, diagnosis of failures, and analysis of inter-component interactions.SUMMARY
[0003] According to an aspect of the present invention, a computer-implemented method for error snapshot generation is provided. The computer-implemented method includes intercepting, by a computer, request data exchanged between an application programming interface (API) gateway and a first service of a set of services. The computer-implemented method further includes first API data associated with a first API call based on the intercepting of the request data. The first API call is between a first pod of a set of pods and a second service of the set of services. The first pod includes a container of a set of containers. Each pod of the set of pods is associated with a corresponding service of the set of services. The computer-implemented method further includes monitoring, by the computer, a service log of the first pod based on the intercepting of the first API data. The computer-implemented method further includes detecting, by the computer, an error condition associated with the monitored service log. The computer-implemented method further includes generating, by the computer, an API error snapshot group based on the detected error condition. The generated API error snapshot group includes the intercepted request data, the intercepted first API data, service configurations associated with the set of services, and deployment configurations associated with the set of containers. The computer-implemented method further includes initiating, by the computer, a debugging environment based on the generated API error snapshot group. The initiating of the debugging environment is for debugging the first API call.
[0004] According to another aspect of the present invention, a computer system is described. The computer system includes a processor set, one or more computer-readable storage media, and program instructions stored on the one or more computer-readable storage media. The program instructions executable by the processor set to cause the processor set to perform a method for error snapshot generation. The program instructions further causethe processor set to intercept request data exchanged between an application programming interface (API) gateway and a first service of a set of services. The program instructions further cause the processor set to intercept first API data associated with a first application programming interface (API) call based on the interception of the request data. The first API call is between a first pod of a set of pods and a second service of the set of services. The first pod includes a container of a set of containers. Each pod of the set of pods is associated with a corresponding service of the set of services. The program instructions further cause the processor set to monitor a service log of the first pod based on the interception of the first API data. The program instructions further cause the processor set to detect an error condition associated with the monitored service log. The program instructions further cause the processor set to generate an API error snapshot group based on the detected error condition. The generated API error snapshot group includes the intercepted first API data, service configurations associated with the set of services, and deployment configurations associated with the set of containers. The program instructions further cause the processor set to initiate a debugging environment based on the generated API error snapshot group. The program instructions further cause the processor set to simulate the first API call in the initiated debugging environment. The program instructions further cause the processor set to render information associated with the simulated first API call on a user device to debug the first API call.
[0005] According to another aspect of the present invention, a computer-program product for error snapshot generation is described.
[0006] Additional technical features and benefits are realized through the techniques of the disclosure. Embodiments and aspects of the disclosure are described in detail herein and are considered a part of the claimed subject matter. For a better understanding, refer to the detailed description and to the drawings.BRIEF DESCRIPTION OF THE DRAWINGS
[0007] The following description will provide details of preferred embodiments with reference to the following figures wherein:FIG. 1 is a diagram that illustrates a computing environment for error snapshot generation, in accordance with an embodiment of the disclosure;FIG. 2 is a diagram that illustrates an environment for error snapshot generation, in accordance with an embodiment of the disclosure;FIGs. 3A and 3B are diagrams that collectively illustrate exemplary operations for error snapshot generation, in accordance with an embodiment of the disclosure;FIG. 4 is a diagram that illustrates an exemplary representation of an error snapshot group for an application programming interface (API) chain, in accordance with an embodiment of the disclosure; andFIGs. 5A and 5B are diagrams that collectively illustrate a flowchart of an exemplary method for error snapshot generation, in accordance with an embodiment of the disclosure.DETAILED DESCRIPTION
[0008] Large-scale distributed systems are fundamental for supporting high-throughput computational workloads and extensive data processing operations. The large-scale distributed systems are generally composed of multiple interconnected components such as microservices that operate across heterogeneous computing environments and geographically dispersed infrastructures. Due to the dynamic nature and complexities associated with the large-scale distributed systems, ensuring operational reliability and performance in such system presents significant challenges. In particular, detecting anomalies, diagnosing failures, and analyzing inter-component interactions are associated with continuous monitoring and structured debugging mechanisms to preserve the operational integrity and responsiveness of the large-scale distributed systems.
[0009] Conventional systems focus on capturing and analyzing API errors by storing snapshots of API requests and API responses. While the snapshots provide valuable insights into individual API failure, they are insufficient for accurately recreating problem scenarios in complex distributed environments. Large-scale systems involve intricate dependencies, including dynamic service interactions, external API calls, network conditions, and evolving configurations. The inability to restore original network conditions, service interactions, and runtime environments prevents precise replication of production failures, thereby limiting effective error diagnosis.
[0010] To address these issues, a system for error snapshot group is disclosed. The system intercepts request data between an API gateway and a set of services associated with a production environment. Each service of the set of services is associated with a corresponding pod of a set of pods. Further, each pod of the set of pods includes a corresponding container of a set of containers. The set of containers is associated with various microservices (e.g., a core microservice or a non-core microservice). The system further intercepts API data associated with an API call between a first pod of the set of pods and a corresponding service of the set of services. The API data includes a method associated with the API call, API request data associated with the API call, API response data associated with the API call, a path associated with the API call, and a status code associated with the API call. Further, the system generates a first API snapshot based on the request data, the API data, service configurations associated with the set of services, deployment configurations associated with the set of containers, and persistent volume (PV) data associated with the first pod. The PV data reflects stateful runtime context that may be used to accurately reproduce execution conditions. The system further generates additional API snapshots for each API call between the set of pods and the set of services. The generated additional API snapshots only include incremental data (e.g., API data associated with a corresponding API call and the PV data associated with a corresponding pod) to avoid data redundancy. The system further monitors a service log associated with each pod of the set of pods. The system further detects an error condition based on the monitoring of the service log. Further, the system further generates an API error snapshot group by combining the first API snapshot and the additional API snapshots. Based on the API error snapshot group, the system initiates a debugging environment by deploying a pod that includes a container executing an affected core microservice. Further, the system initiates a debug APIsimulator to simulate non-core microservices, thereby reconstructing production environment conditions for debugging.
[0011] The proposed system overcomes prior limitations by generating a comprehensive API error snapshot group that includes the service configurations, the deployment configurations, the PV data, and the API data (e.g., API requests and API responses). The API error snapshot group serves as a structured and self-contained representation of a production environment. Thus, the proposed system reconstructs a debugging environment, ensuring an accurate reproduction of conditions present in the production environment at the time of failure.Furthermore, a debug API simulator replaces dependent business services, allowing for full-link debugging without requiring the entire production environment (e.g., containers that include the non-core microservices) to be redeployed. This approach ensures that complex data flows, runtime configurations, and service dependencies are replicated, enabling precise error diagnosis and reducing debugging time.
[0012] In various embodiments of the disclosure, a computer-implemented method for error snapshot generation. The computer-implemented method includes intercepting, by a computer, request data exchanged between an application programming interface (API) gateway and a first service of a set of services. The computer-implemented method further includes first API data associated with a first API call based on the intercepting of the request data. The first API call is between a first pod of a set of pods and a second service of the set of services. The first pod includes a container of a set of containers. Each pod of the set of pods is associated with a corresponding service of the set of services. The computer-implemented method further includes monitoring, by the computer, a service log of the first pod based on the intercepting of the first API data. The computer-implemented method further includes detecting, by the computer, an error condition associated with the monitored service log. The computer-implemented method further includes generating, by the computer, an API error snapshot group based on the detected error condition. The generated API error snapshot group includes the intercepted request data, the intercepted first API data, service configurations associated with the set of services, and deployment configurations associated with the set of containers. The computer-implemented method further includes initiating, by the computer, a debugging environment based on the generated API error snapshot group. The initiating of the debugging environment is for debugging the first API call. Therefore, the disclosed computer-implemented method provides the automated generation of an API error snapshot group by aggregating the request data, the first API data, the service configurations, and the deployment configurations. This enables accurate reconstruction of execution conditions leading to error in a production environment, thereby improving debugging efficiency, reducing system downtime, and enhancing overall system reliability.
[0013] In various embodiments of the disclosure, the computer-implemented method further includes generating, by the computer, a first API snapshot based on the intercepting of the first API data. The first API snapshot includes the intercepted first API data, the service configurations, and the deployment configurations. The computer-implemented method further includes monitoring, by the computer, the service log based on thegenerated first API snapshot. Therefore, the disclosed computer-implemented method enables generation of the first API snapshot including key runtime and configuration data, which serves as a contextual reference for log monitoring. This provides targeted analysis of production environment behavior, thereby improving error traceability and enhancing the precision of root cause identification.
[0014] In various embodiments of the disclosure, the computer-implemented method further includes intercepting, by the computer, second API data associated with a second API call based on the intercepting of the first API data. The second API call is between a second pod of the set of pods and a third service of the set of services. The computer-implemented method further includes generating, by the computer, a second API snapshot based on the intercepting of the second API data. The second API snapshot includes the intercepted second API data. The generated API error snapshot group includes the first API snapshot and the second API snapshot. Therefore, the disclosed computer-implemented method enables efficient and scalable storage of debugging data by generating the first API snapshot with comprehensive runtime and configuration data, followed by the second API snapshot including only incremental data associated with a subsequent API call (e.g., the second API call). This incremental snapshotting reduces redundancy, optimizes memory usage, and ensures accurate reconstruction of execution flows across distributed services for precise error analysis.
[0015] In various embodiments of the disclosure, the computer-implemented method further includes retrieving, by the computer, persistent volume (PV) data associated with the first pod based on the intercepting of the first API data. The generated API error snapshot group further includes the retrieved PV data. Therefore, the disclosed computer-implemented method enhances the accuracy of error diagnosis by incorporating the PV data into the API error snapshot group. The inclusion of the PV data ensures that stateful runtime conditions, such as cached variables, temporary files, or session-specific storage, are preserved, thereby enabling accurate reproduction of a state of various microservices running in the production environment at the time of error.
[0016] In various embodiments of the disclosure, the computer-implemented method further includes deploying, by the computer, a specific pod in the initiated debugging environment based on the generated API error snapshot group. The computer-implemented method further includes retrieving, by the computer, a set of container images associated with the set of containers based on the deployment configurations and the deploying of the specific pod. The computer-implemented method further includes instantiating, by the computer, a test container based on a container image of the retrieved set of container images and the retrieved PV data. The test container is identical to the container of the set of containers. Therefore, the disclosed computer-implemented method provides the precise reconstruction of production conditions by deploying the specific pod in the debugging environment based on the generated API error snapshot group. By retrieving container images based on deployment configurations and instantiating a test container using both the container image and corresponding PV data, the system ensures that the test container accurately replicates the original container. This enables error reproduction without impacting the production environment.
[0017] In various embodiments of the disclosure, the computer-implemented method further includes deploying, by the computer, a specific service in the initiated debugging environment based on the generated API error snapshot group. The deployed specific service provides a network endpoint for the deployed specific pod. Therefore, the disclosed computer-implemented method enables accurate reconstruction of network communication pathways within the debugging environment by deploying the specific service corresponding to the deployed pod. The deployed specific service provides a network endpoint for the specific pod, thereby replicating service discovery and inter-pod communication mechanisms present in the production environment allowing for a consistent evaluation of the specific pod in the debugging environment.
[0018] In various embodiments of the disclosure, the computer-implemented method further includes initiating, by the computer, a debug API simulator in the initiated debugging environment. The computer-implemented method further includes simulating, by the computer, the first API call in the initiated debugging environment based on the instantiating of the test container and the initiated debug API simulator. The computer-implemented method further includes rendering, by the computer, information associated with the simulated first API call on a user device to debug the first API call. Therefore, the disclosed computer-implemented method provides a controlled and isolated debugging process by initiating the debug API simulator within the debugging environment. The debug API simulator and the test container within the specific pod enable simulation of the first API call, thereby allowing the debugging environment to reproduce the error condition to improve diagnostic accuracy and reduce the overall time for the debugging.
[0019] In various embodiments of the disclosure, the intercepted first API data includes image information associated with each container image of the set of container images. The computer-implemented method further includes retrieving, by the computer, the set of container images based on the deployment configurations and the image information. Therefore, the disclosed computer-implemented method enhances the accuracy and reliability of container image retrieval by including image information within the intercepted first API data. The inclusion of the image information enables verification of the set of container images retrieved based on the deployment configurations, thereby ensuring that the instantiated test container in the debugging environment is consistent with the first container deployed in the production environment.
[0020] In various embodiments of the disclosure, the computer-implemented method further includes monitoring, by the computer, the service log, a status code associated with the first API call, and a lifecycle of the first pod. The computer-implemented method further includes detecting, by the computer, the error condition associated with at least one of the monitored service log, monitored status code, or the monitored lifecycle of the first pod. Therefore, the disclosed computer-implemented method improves error detection accuracy by monitoring various aspects associated with the first API call.
[0021] In various embodiments of the disclosure, the first API data includes at least one of a method associated with the first API call, API request data associated with the first API call, API response data associated with the first API call, a path associated with the first API call, a status code associated with the first API call, or image information associated with each container of the set of containers. Therefore, the disclosed computer-implemented method enhances accuracy to simulate the first API call by capturing a comprehensive set of attributes of the first API call.
[0022] In various embodiments of the disclosure, a computer system is described. The computer system includes a processor set, one or more computer-readable storage media, and program instructions stored on the one or more computer-readable storage media. The program instructions executable by the processor set to cause the processor set to perform a method for error snapshot generation. The program instructions further cause the processor set to intercept request data exchanged between an application programming interface (API) gateway and a first service of a set of services. The program instructions further cause the processor set to intercept first API data associated with a first application programming interface (API) call based on the interception of the request data. The first API call is between a first pod of a set of pods and a second service of the set of services. The first pod includes a container of a set of containers. Each pod of the set of pods is associated with a corresponding service of the set of services. The program instructions further cause the processor set to monitor a service log of the first pod based on the interception of the first API data. The program instructions further cause the processor set to detect an error condition associated with the monitored service log. The program instructions further cause the processor set to generate an API error snapshot group based on the detected error condition. The generated API error snapshot group includes the intercepted first API data, service configurations associated with the set of services, and deployment configurations associated with the set of containers. The program instructions further cause the processor set to initiate a debugging environment based on the generated API error snapshot group. The program instructions further cause the processor set to simulate the first API call in the initiated debugging environment. The program instructions further cause the processor set to render information associated with the simulated first API call on a user device to debug the first API call. Therefore, the disclosed system provides the automated generation of an API error snapshot group by aggregating request data, API data, service configurations, deployment configurations, and persistent volume data. This enables accurate reconstruction of execution conditions leading to system failure, thereby improving debugging efficiency, reducing system downtime, and enhancing overall system reliability.
[0023] In various embodiments of the disclosure, the program instructions further cause the processor set to generate a first API snapshot based on the interception of the first API data. The first API snapshot includes the intercepted first API data, the service configurations, and the deployment configurations. The program instructions further cause the processor set to monitor the service log based on the generated first API snapshot. Therefore, the disclosed system enables the generation of the first API snapshot including key runtime and configuration data,which serves as a contextual reference for log monitoring. This provides targeted analysis of production environment behavior, thereby improving error traceability and enhancing the precision of root cause identification.
[0024] In various embodiments of the disclosure, the program instructions further cause the processor set to intercept second API data associated with a second API call based on the interception of the first API data. The second API call is between a second pod of the set of pods and a third service of the set of services. The program instructions further cause the processor set to generate a second API snapshot based on the interception of the second API data. The second API snapshot includes the intercepted second API data. The generated API error snapshot group includes the first API snapshot and the second API snapshot. Therefore, the disclosed system enables efficient and scalable storage of debugging data by generating the first API snapshot with comprehensive runtime and configuration data, followed by the second API snapshot including only incremental data associated with a subsequent API call (e.g., the second API call). This incremental snapshotting reduces redundancy, optimizes memory usage, and ensures accurate reconstruction of execution flows across distributed services for precise error analysis.
[0025] In various embodiments of the disclosure, the program instructions further cause the processor set to retrieve persistent volume (PV) data associated with the first pod based on the interception of the first API data. The generated API error snapshot group further includes the retrieved PV data. Therefore, the disclosed system enhances the accuracy of error diagnosis by incorporating the PV data into the API error snapshot group. The inclusion of the PV data ensures that stateful runtime conditions, such as cached variables, temporary files, or session-specific storage, are preserved, thereby enabling accurate reproduction of a state of various microservices running in the production environment at the time of error.
[0026] In various embodiments of the disclosure, the program instructions further cause the processor set to deploy a specific pod in the initiated debugging environment based on the generated API error snapshot group. The program instructions further cause the processor set to retrieve a set of container images associated with the set of containers based on the deployment configurations and the deployment of the specific pod. The program instructions further cause the processor set to instantiate a test container based on a container image of the retrieved set of container images, and the retrieved PV data. The test container is identical to the container of the set of containers. Therefore, the disclosed system provides the precise reconstruction of production conditions by deploying the specific pod in the debugging environment based on the generated API error snapshot group. By retrieving container images based on deployment configurations and instantiating a test container using both the container image and corresponding PV data, the system ensures that the test container accurately replicates the original container. This enables error reproduction without impacting the production environment.
[0027] In various embodiments of the disclosure, the program instructions further cause the processor set to deploy a specific service in the initiated debugging environment based on the generated API error snapshot group.The deployed specific service provides a network endpoint for the deployed specific pod. Therefore, the disclosed system enables accurate reconstruction of network communication pathways within the debugging environment by deploying the specific service corresponding to the deployed pod. The deployed specific service provides a network endpoint for the specific pod, thereby replicating service discovery and inter-pod communication mechanisms present in the production environment allowing for a consistent evaluation of the specific pod in the debugging environment.
[0028] In various embodiments of the disclosure, the program instructions further cause the processor set to initiate a debug API simulator in the initiated debugging environment. The program instructions further cause the processor set to simulate the first API call in the initiated debugging environment based on the instantiation of the test container and the initiated debug API simulator. Therefore, the disclosed system provides a controlled and isolated debugging process by initiating the debug API simulator within the debugging environment. The debug API simulator and the test container within the specific pod enable simulation of the first API call, thereby allowing the debugging environment to reproduce the error condition to improve diagnostic accuracy and reduce overall time for the debugging.
[0029] In various embodiments of the disclosure, the intercepted first API data includes image information associated with each container image of the set of container images. The program instructions further cause the processor set to retrieve the set of container images based on the deployment configurations and the image information. Therefore, the disclosed system enhances the accuracy and reliability of container image retrieval by including image information within the intercepted first API data. The inclusion of the image information enables verification of the set of container images retrieved based on the deployment configurations, thereby ensuring that the instantiated test container in the debugging environment is consistent with the first container deployed in the production environment.
[0030] In various embodiments of the disclosure, the program instructions further cause the processor set to monitor the service log, a status code associated with the first API call, and a lifecycle of the first pod. The program instructions further cause the processor set to detect the error condition associated with at least one of the monitored service log, the monitored status code, or the monitored lifecycle of the first pod. Therefore, the disclosed system improves error detection accuracy by monitoring various aspects associated with the first API call.
[0031] In various embodiments of the disclosure, a computer-program product is described. The computerprogram product includes one or more computer-readable storage media and program instructions stored on the one or more computer-readable storage media to perform operations for error snapshot generation. The operations include intercepting request data exchanged between an API gateway and a first service of a set of services. The operations further include intercepting first API data associated with a first API call based on the intercepting of the request data. The first API call is between a first pod of a set of pods and a second service of the set of services.The first pod includes a container of a set of containers. Each pod of the set of pods is associated with a corresponding service of the set of services. The operations further include monitoring a service log of the first pod based on the intercepting of the first API data. The operations further include detecting an error condition associated with the monitored service log. The operations further include generating an API error snapshot group based on the detected error condition. The generated API error snapshot group includes the intercepted request data, the intercepted first API data, service configurations associated with the set of services, and deployment configurations associated with the set of containers. The operations further include initiating a debugging environment based on the generated API error snapshot group. The initiating of the debugging environment is for debugging the first API call. Therefore, the disclosed computer program product provides the automated generation of an API error snapshot group by aggregating the request data, the first API data, the service configurations, and the deployment configurations. This enables accurate reconstruction of execution conditions leading to error in a production environment, thereby improving debugging efficiency, reducing system downtime, and enhancing overall system reliability.
[0032] Additional technical features and benefits are realized through the various processes of the disclosure. Embodiments and aspects of the disclosure are described in detail herein and are considered a part of the claimed subject matter.
[0033] Various aspects of the disclosure are described by narrative text, flowcharts, block diagrams of computer systems, and / or block diagrams of the machine logic included in computer-program product (CPP) embodiments. With respect to any flowcharts, depending upon the technology involved, the operations can be performed in a different order than what is shown in a given flowchart. For example, again depending upon the technology involved, two operations shown in successive flowchart blocks could be performed in reverse order, as a single integrated operation, concurrently, or in a manner at least partially overlapping in time.
[0034] A computer-program product embodiment ("CPP embodiment” or "CPP”) is a term used in the disclosure to describe any set of one, or more, storage media (also called "mediums”) collectively included in a set of one, or more, storage devices that collectively include machine readable code corresponding to instructions and / or data for performing computer operations specified in a given CPP claim. A "storage device” is any tangible device that can retain and store instructions for use by a computer processor. Without limitation, the computer-readable storage medium could be an electronic storage medium, a magnetic storage medium, an optical storage medium, an electromagnetic storage medium, a semiconductor storage medium, a mechanical storage medium, or any suitable combination of the foregoing. Some known types of storage devices that include these mediums include diskette, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), static random access memory (SRAM), compact disc read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanically encoded device (such as punch cards or pits I lands formed in a major surface of a disc) or any suitable combination of the foregoing. Acomputer-readable storage medium, as that term is used in the disclosure, is not to be construed as storage in the form of transitory signals per se, such as radio waves or additional freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide, light pulses passing through a fiber optic cable, electrical signals communicated through a wire, and / or additional transmission media. As will be understood by those of skill in the art, data is typically moved at some occasional points in time during normal operations of a storage device, such as during access, de-fragmentation, or garbage collection, but this does not render the storage device as transitory because the data is not transitory while being stored.
[0035] FIG. 1 is a diagram that illustrates a computing environment for error snapshot generation, in accordance with an embodiment of the disclosure. With reference to FIG. 1, there is shown a computing environment 100 that contains an example of an environment for the execution of at least some of the computer code involved in performing the disclosed methods, such as an error snapshot generation code 120B. In addition to the error snapshot generation code 120B, computing environment 100 includes, for example, a computer 102, a wide area network (WAN) 104, an end user device (EUD) 106, a remote server 108, a public cloud 110, and a private cloud 112. In this embodiment of the disclosure, the computer 102 includes a processor set 114 (including a processing circuitry 114A and a cache 114B), a communication fabric 116, a volatile memory 118, a persistent storage 120 (including an operating system 120A and the error snapshot generation code 120B, as identified above), a peripheral device set 122 (including a user interface (Ul) device set 122A, a storage 122B, and an Internet of Things (loT) sensor set 122C), and a network module 124. The remote server 108 includes a remote database 108A. The public cloud 110 includes a gateway 110A, a cloud orchestration module 110B, a host physical machine set 110C, a virtual machine set 110D, and a container set 110E.
[0036] The computer 102 may take the form of a desktop computer, a laptop computer, a mainframe computer, a quantum computer, a virtual machine, or any form of a computer or a mobile device now known or to be developed in the future that may be configured for running a program, accessing a network or querying a database, such as the remote database 108A. As is well understood in the art of computer technology, and depending upon the technology, the performance of a computer-implemented method may be distributed among multiple computers and / or between multiple locations. In an embodiment, in this presentation of the computing environment 100, detailed discussion is focused on a single computer, specifically the computer 102, to keep the presentation as simple as possible. The computer 102 may be located in a cloud, even though not shown in a cloud in FIG. 1. In an alternate embodiment, the computer 102 may not be in a cloud except to any extent as may be affirmatively indicated.
[0037] The processor set 114 includes one, or more, computer processors of any type now known or to be developed in the future. The processing circuitry 114A may be distributed over multiple packages, for example, multiple, coordinated integrated circuit chips. The processing circuitry 114A may implement multiple processor threads and / or multiple processor cores. The cache 114B may be memory that is located in the processor chippackage(s) and is typically used for data or code that should be available for rapid access by the threads or cores running on the processor set 114. Cache memories are typically organized into multiple levels depending upon relative proximity to the processing circuitry 114A. Alternatively, some, or all, of the cache 114B for the processor set 114 may be located "off-chip.” In some computing environments, the processor set 114 may be designed for working with qubits and performing quantum computing.
[0038] Computer readable program instructions are typically loaded onto the computer 102 to cause a series of operations to be performed by the processor set 114 of the computer 102 and thereby effect a computer-implemented method, such that the instructions thus executed will instantiate the methods specified in flowcharts and / or narrative descriptions of computer-implemented methods included in this document (collectively referred to as "the disclosed methods”). These computer-readable program instructions are stored in various types of computer-readable storage media, such as the cache 114B and the additional storage media discussed below. The program instructions, and associated data, are accessed by the processor set 114 to control and direct the performance of the disclosed methods. In computing environment 100, at least some of the instructions for performing the disclosed methods may be stored in the dynamic modification of the error snapshot generation code 120B in the persistent storage 120.
[0039] The communication fabric 1161s the signal conduction path that allows the various components of the computer 102 to intercommunicate. Typically, this fabric is made of switches and electrically conductive paths, such as the switches and electrically conductive paths that make up buses, bridges, physical input / output ports, and the like. Various types of signal communication paths may be used, such as fiber optic communication paths and / or wireless communication paths.
[0040] The volatile memory 118 is any type of volatile memory now known or to be developed in the future. Examples include dynamic type random access memory (RAM) or static type RAM. Typically, the volatile memory 118 is characterized by a random access, but this is not general case unless affirmatively indicated. In the computer 102, the volatile memory 118 is located in a single package and is internal to the computer 102, but alternatively or additionally, the volatile memory 118 may be distributed over multiple packages and / or located externally with respect to the computer 102.
[0041] The persistent storage 120 is any form of non-volatile storage for computers that is now known or to be developed in the future. The non-volatility of this storage means that the stored data is maintained regardless of whether power is being supplied to the computer 102 and / or directly to the persistent storage 120. The persistent storage 120 may be a read-only memory (ROM), but typically at least a portion of the persistent storage 120 allows writing of data, deletion of data, and re-writing of data. Some familiar forms of the persistent storage 120 include magnetic disks and solid-state storage devices. The operating system 120A may take several forms, such as various known proprietary operating systems or open-source Portable Operating System Interface-type operatingsystems that employ a kernel. The code included in the error snapshot generation code 120B typically includes at least some of the computer code involved in performing the disclosed methods.
[0042] The peripheral device set 122 includes the set of peripheral devices of the computer 102. Data communication connections between the peripheral devices and the additional components of the computer 102 may be implemented in various ways, such as Bluetooth connections, Near-Field Communication (NFC) connections, connections made by cables (such as universal serial bus (USB) type cables), insertion-type connections (for example, secure digital (SD) card), connections made through local area communication networks and even connections made through wide area networks such as the internet. In various embodiments of the disclosure, the Ul device set 122A may include components such as a display screen, speaker, microphone, wearable devices (such as goggles and smartwatches), keyboard, mouse, printer, touchpad, game controllers, and haptic devices. The storage 122B is external storage, such as an external hard drive, or insertable storage, such as an SD card. The storage 122B may be persistent and / or volatile. In some embodiments of the disclosure, the storage 122B may take the form of a quantum computing storage device for storing data in the form of qubits. In embodiments of the disclosure where the computer 102 may have a large amount of storage (for example, where the computer 102 locally stores and manages a large database) then this storage may be provided by peripheral storage devices designed for storing very large amounts of data, such as a storage area network (SAN) that is shared by multiple, geographically distributed computers. The loT sensor set 122C is made up of sensors that can be used in Internet of Things applications. For example, a first sensor may be a thermometer, and a second sensor may be a motion detector.
[0043] The network module 124 is the collection of computer software, hardware, and firmware that allows the computer 102 to communicate with one or more computers through the WAN 104. The network module 124 may include hardware, such as modems or Wi-Fi signal transceivers, software for packetizing and / or de-packetizing data for communication network transmission, and / or web browser software for communicating data over the internet. In some embodiments of the disclosure, network control functions, and network forwarding functions of the network module 124 are performed on the same physical hardware device. In various embodiments of the disclosure (for example, embodiments that utilize software-defined networking (SDN)), the control functions and the forwarding functions of the network module 124 are performed on physically separate devices, such that the control functions manage several different network hardware devices. Computer-readable program instructions for performing the disclosed methods can typically be downloaded to the computer 102 from an external computer or external storage device through a network adapter card or network interface included in the network module 124.
[0044] The WAN 104 is a wide area network (for example, the internet) that may be configured for communicating computer data over non-local distances by any technology for communicating computer data, now known or to be developed in the future. In some embodiments of the disclosure, the WAN 104 may be replaced and / or supplemented by local area networks (LANs) designed to communicate data between devices located in alocal area, such as a Wi-Fi network. The WAN 104 and / or LANs typically include computer hardware such as copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers, and edge servers.
[0045] The EUD 106 is any computer system that is controlled by an end user (for example, a customer of an enterprise that operates the computer 102) and may take any of the forms discussed above in connection with the computer 102. The EUD 106 typically receives helpful and useful data from the operations of the computer 102. For example, in a hypothetical case where the computer 102 is designed to provide a recommendation to an end user, this recommendation would typically be communicated from the network module 124 of the computer 102 through the WAN 104 to the EUD 106. In this way, the EUD 106 can display, or alternatively present recommendations to an end user. In some embodiments of the disclosure, the EUD 106 may be a client device, such as a mainframe computer, a desktop computer, and so on.
[0046] The remote server 108 is any computer system that serves at least some data and / or functionality to the computer 102. The remote server 108 may be controlled and used by the same entity that operates the computer 102. The remote server 108 represents the machine(s) that collect and store helpful and useful data for use by the one or more computers, such as the computer 102. For example, in a hypothetical case where the computer 102 is designed and programmed to provide a recommendation based on historical data, then this historical data may be provided to the computer 102 from the remote database 108A of the remote server 108.
[0047] The public cloud 110 is any computer system available for use by multiple entities that provides on-demand availability of computer system resources and / or additional computer capabilities, especially data storage (cloud storage) and computing power, without direct active management by the user. Cloud computing typically leverages the sharing of resources to achieve coherence and economies of scale. The direct and active management of the computing resources of the public cloud 110 is performed by the computer hardware and / or software of the cloud orchestration module 110B. The computing resources provided by the public cloud 110 are typically implemented by virtual computing environments that run on various computers making up the computers of the host physical machine set 110C, which is the universe of physical computers in and / or available to the public cloud 110. The virtual computing environments (VCEs) typically take the form of virtual machines from the virtual machine set 110D and / or containers from the container set 110E. In an embodiment, the VCEs may be stored as images and may be transferred among and between the various physical machine hosts, either as images or after the instantiation of the VCE. The cloud orchestration module 110B manages the transfer and storage of images, deploys new instantiations of VCEs, and manages active instantiations of VCE deployments. The gateway 110A is the collection of computer software, hardware, and firmware that allows the public cloud 110 to communicate through the WAN 104.
[0048] Some further explanation of virtualized computing environments (VCEs) will now be provided. VCEs can be stored as "images”. A new active instance of the VCE can be instantiated from the image. Two familiar types of VCEs are virtual machines and containers. A container is a VCE that uses operating-system-level virtualization. This refers to an operating system feature in which the kernel allows the existence of multiple isolated user-space instances, called containers. These isolated user-space instances typically behave as real computers from the point of view of programs running in the container. A computer-program running on an ordinary operating system can utilize resources of that computer, such as connected devices, files and folders, network shares, CPU power, and quantifiable hardware capabilities. However, programs running inside a container can only use the contents of the container and devices assigned to the container, a feature which is known as containerization.
[0049] The private cloud 112 is similar to the public cloud 110, except that the computing resources are only available for use by a single enterprise. While the private cloud 112 is depicted as being in communication with the WAN 104, in various embodiments of the disclosure, the private cloud 112 may be disconnected from the internet entirely and only accessible through a local / private network. A hybrid cloud is a composition of multiple clouds of different types (for example, private, community, or public cloud types), often respectively implemented by different vendors. Each cloud of the multiple clouds remains a separate and discrete entity, but the larger hybrid cloud architecture is bound together by standardized or proprietary technology that enables orchestration, management, and / or data / application portability between the multiple constituent clouds. In this embodiment of the disclosure, the public cloud 110 and the private cloud 112 are both part of a larger hybrid cloud.
[0050] FIG. 2 is a diagram that illustrates an environment for error snapshot generation, in accordance with an embodiment of the disclosure. FIG. 2 is explained in conjunction with elements from FIG. 1. With reference to FIG. 2, there is shown a diagram of a network environment 200. The network environment 200 includes a system 202, a production environment 204, a user device 206, a database 208, and a server 210. The network environment 200 further includes the WAN 104 of FIG. 1. In an embodiment of the disclosure, the system 202 may be an exemplary embodiment of the computer 102 of FIG. 1.
[0051] The system 202 may include suitable logic, circuitry, interfaces, and / or code that is configured for error snapshot generation. The system 202 is configured to intercept application programming interface (API) data associated with the production environment 204. The API data may correspond to information associated with an API call, which may include, but is not limited to, an HTTP method (e.g., POST, GET), an endpoint path (e.g., / order / create), request payloads (e.g., {userid: 45, productid: 12}), response data (e.g., {status: success}), response status code (e.g., 200, 503, timestamp of API request initiation, and timestamp of API response reception.
[0052] The system 202 is further configured to generate an API snapshot based on the interception of the API data. The system 202 is further configured to monitor a service log associated with the production environment 204. In an embodiment, the service log corresponds to a runtime log generated by the production environment 204,such as application containers or microservices, and may include information such as error messages, execution events, internal metrics, or custom debug output. For example, the service log may record a message such as "Timeout while invoking Paymentservice'' which may indicate potential application faults. Details about the monitoring of the service log are provided, for example, in FIG. 3A. Based on the monitoring of the service log, the system 202 is further configured to detect an error condition. In an embodiment, the system 202 repeats the above operations for each API call of an API chain. The API chain corresponds to a series of interconnected API calls that are invoked sequentially to achieve a complex task or workflow. Each API call in the chain processes data or performs a specific function, and the output from one API call serves as the input for the next API call in the sequence. Further, the system 202 is configured to generate an API error snapshot group. The API error snapshot group corresponds to a collection of one or more API snapshots associated with a corresponding API call. The generated API error snapshot group is used to debug the API call.
[0053] The production environment 204 may correspond to a large-scale distributed system that may include various interconnected components such as application server, microservices, databases, load balancers, and external service integration. The interconnected components may collectively facilitate the processing of client requests, data retrieval, and business logic execution under real-world conditions. For example, in a cloud-based e-commerce platform, the production environment 204 may include an API gateway to handle incoming Hypertext Transfer Protocol (HTTP) for user authentication, product searches, and order placements. The production environment 204 may further include microservices to manage various functionalities such as inventory tracking, payment processing, and recommendation systems.
[0054] The microservices may be logically categorized as core microservices and non-core microservices based on functional relevance of the microservice to the primary application workflow and proximity of the microservice to the critical execution path of business transactions. In an embodiment, the core microservices may implement application logic and are directly involved in the fulfillment of primary business processes. The core microservices may typically handle transactional or domain-specific operations, such as order processing, user account management, payment authorization, or product catalog management. Thus, the core microservices facilitate end-to-end functionality of an application (e.g., software system or product built using various microservices). The core microservices are often orchestrated through direct request-response chains and may depend on additional core or non-core microservices to fulfill a complete transaction.
[0055] The non-core microservices are configured to perform auxiliary, background, or infrastructure-related tasks that support, extend, or enhance the capabilities of the core microservices and can be avoided to complete the primary business transaction. Examples of the non-core microservices include notification delivery (e.g., email or SMS), logging and telemetry collection, reporting services, asynchronous event processing, analytics, or integrations with third-party external systems. The production environment 204 may further include databases,caching layers, logging and monitoring services, and the like. Given the complexity of the production environment 204, failures may occur due to network latencies, service outages, database inconsistencies, or software defects.
[0056] The user device 206 may include suitable logic, circuitry, interfaces, and / or code that is configured to enable a user 232 to debug the API call. Examples of the user device 206 may include, but are not limited to, a computer, a smartphone, a cellular phone, a mobile phone, and the like. The user device 206 is configured to display simulated API calls. In an embodiment, information (e.g., simulation result) associated with the simulated API call may be rendered on a display screen. For the sake of brevity, the network environment 200 is shown to include the user device 206 and the user 232, in actual implementation the network environment 200 may include a set of user devices (identical to the user device 206) and a set of users associated with the set of user devices.
[0057] The database 208 may correspond to an organized collection of data that may be stored and accessed electronically from a computer system (such as the system 202). In an embodiment, the database 208 may store the error data. In an embodiment, the database 208 is configured to receive the API error snapshot group from the system 202. The structure of the database 208 typically involves tables, records, and fields that can be managed through various database management systems (DBMS). Examples of the database 208 may include, but are not limited to, a relational database, a Non-Structured Query Language (NoSQL) database, a hierarchical database, a network database, a transactional database, a data warehouse, a distributed database, or the like.
[0058] The server 210 may include suitable logic, circuitry, and interfaces, and / or code that is configured to receive the API error snapshot group from the system 202. Upon receiving the API error snapshot group, the server 210 is further configured to store the API error snapshot group. The server 210 may be implemented as a cloud server and may execute operations through web applications, cloud applications, HTTP requests, repository operations, file transfer, and the like. Additional example implementations of the server 210 may include, but are not limited to, a database server, a file server, a web server, a media server, an application server, a mainframe server, or a cloud computing server.
[0059] In an embodiment of the disclosure, the server 210 may be implemented as a plurality of distributed cloud-based resources by use of several technologies that are well known to those ordinarily skilled in the art. A person with ordinary skill in the art will understand that the scope of the disclosure may not be limited to the implementation of the server 210 and the system 202 as two separate entities. In certain embodiments, the functionalities of the server 210 can be incorporated in its entirety or at least partially in the system 202, without a departure from the scope of the disclosure.
[0060] The production environment 204 may include an ingress 212, a first service 214, a second service 216, a first pod 218, and a second pod 220. The ingress 212 may correspond to the API gateway. The ingress 212 is configured to receive incoming API requests. Based on the reception of the API requests, the ingress 212 isfurther configured to route the API requests to appropriate backend services. The ingress 212 corresponds to an API object that manages external access to a set of services (e.g., the first service 214 and the second service 216) within a cluster, typically for Hypertext Transfer Protocol (HTTP) and Hypertext Transfer Protocol Secure (HTTPS) traffic. The ingress 212 acts as a centralized entry point for routing external requests to the set of services based on defined rules, such as hostnames and paths. The ingress 212 eliminates the need for creating multiple load balancers or exposing each service of the set of services manually by providing features like Uniform Resource Locator (URL)-based routing, Secure Socket (SSL) / Transport Layer Security (TLS) termination, load balancing, and name-based virtual hosting.
[0061] A service (e.g., the first service 214 and the second service 216) may correspond to a logical abstraction that provides a stable network endpoint to one or more pods (e.g., the first pod 218 and the second pod 220). For the sake of brevity, the production environment 204 is shown to include the first service 214, the second service 216, the first pod 218, and the second pod 220, in actual implementation the production environment 204 may include a plurality of services and a plurality of pods. The first service 214 and the second service 216 may collectively be referred to as a set of services. Further, the first pod 218 and the second pod 220 may collectively be referred to as a set of pods.
[0062] A pod (e.g., the first pod 218 and the second pod 220) may correspond to the smallest deployable unit in Kubernetes® that encapsulates one or more containers that share the same network namespace, storage, and configuration options. Each pod (or pods) may enable tightly coupled containers to run together in an isolated environment, providing communication and resource sharing among the containers. For example, a pod may include a web server container running nginx to handle hypertext transfer protocol (HTTP) requests from clients. Additionally, the pod may include a database container running MySQL, that stores and retrieves data from a web application. Since both the web server and database are housed within the same pod, they share the same network namespace, thereby allowing the web server and the database to communicate directly using "localhost''. This setup enables fast data retrieval and storage without the latency that may typically be associated with inter-pod communication.
[0063] The first pod 218 includes a first container 218A, and the second pod 220 includes a second container 220A. The first container 218A and the second container 220A may collectively be referred to as a set of containers. In an embodiment, the set of containers corresponds to lightweight, portable units that encapsulate a set of microservices and dependencies of the set of microservices such as application binaries, libraries, and runtime environments into a single deployable object. For example, the first container 218A may implement a user profile service while the second container 220A may implement a recommendation engine service. The encapsulation of the microservice and the dependencies of the microservice allow the containers to run consistently across different computing environments. The containers share the host operating system's kernel but operate in isolated user spaces, ensuring that container applications do not interfere among themselves. The containers aredesigned to be ephemeral, meaning they can be easily created, destroyed, and recreated as needed, which enhances scalability and flexibility. The containers are often managed using container orchestration platforms like the Kubernetes®, which automate the deployment, the scaling, and the management. Overall, the containers streamline the development and deployment process, enabling faster and more efficient software delivery.
[0064] For the sake of brevity, the first pod 218 and the second pod 220 are shown to include the first container 218A and the second container 220A, respectively, in actual implementation, the first pod 218 and the second pod 220 may include one or more containers. Additionally, the first pod 218 includes a first service log 218B, and the second pod 220 includes a second service log 220B. In an embodiment, the first service log 218B may be generated by a first microservice within the first container 218A. Additionally, the second service log 220B may be generated by a second microservice within the second container 220A. For the sake of brevity, it is assumed that the first microservice corresponds to the core microservice and the second microservice corresponds to the non-core microservice.
[0065] The first service log 218B is configured to record execution-related information, including API call data, internal processing steps, performance metrics, and error traces associated with the first microservice. For example, if the first container 218A encounters a null pointer exception while processing an API request, the corresponding exception stack trace would be recorded within the first service log 218B. Further, the second service log 220B is configured to record execution-related information, including API call data, internal computational steps, performance metrics, and error traces associated with the second microservice. The first service log 218B and the second service log 220B are used for diagnosing failures and tracking behavior associated with the production environment 204. In an embodiment, the system 202 includes an error monitor 222. The error monitor 222 is configured to intercept request data (e.g., API traffic and service logs) between the ingress 212 and the set of services. The ingress 212 may correspond to an entry point for external client requests into the production environment 204. Further, the set of services represents abstracted network endpoints that expose underlying containerized workloads (e.g., microservices) hosted on one or more pods. For example, an incoming HTTP POST request to the endpoint / order received at the ingress 212 may be routed to a service that forwards the request to an underlying pod running an order processing microservice.
[0066] The error monitor 222 is further configured to intercept API data associated with an API call between a pod of the set of pods and a service of the set of services. For example, if the first pod 218 initiates an internal API call directed to the second service 216 such as a "GET / user-preference” request intended for routing to a userpreference microservice managed under the second service 216, the error monitor 222 intercepts complete request-response transaction. In this context, the service acts as a stable network abstraction that forwards the API call to the second pod 220 running the relevant microservice. The intercepted API data may include HTTP request method (e.g., GET or POST), the API path or endpoint (e.g., / user-preference), query parameters, request headers,request body, response status code (e.g., 200 or 503), response header, and the response body. The error monitor 222 is further configured to generate a first API snapshot based on the interception of the internal API request.
[0067] The error monitor 222 is further configured to monitor a service log (e.g., the first service log 218B or the second service log 220B) based on the intercepting of the API data. The service log may include execution-level information that is generated by a microservice within a container. In an embodiment, the service log may include log messages for specific internal operations, debug statements, error messages, stack traces (e.g., sequence of method calls leading up to error), timestamps, and event-level annotations (e.g., metadata, such as correlation IDs for tracing distributed requests or tags indicating service log severity). For example, while handling a user login API request, the service log may include "Validating credentials for userlD=12345”, "Fetching user profile from database”, "ExceptionJava.Iang.NullPointerException at UserService.java:42”, "Response status: 503 Service Unavailable.” Based on the monitoring of the service log, the error monitor 222 is further configured to detect an error condition associated with the monitored service log. Examples of the error condition may include the detection of specific keywords in the service log, such as "Exception”, “Nul IPointerException” , or "TimeoutError.” Examples of the error condition may further include stack traces indicating code execution failures, log entries including a response status code different than 200, unusually long processing durations or timeouts, and the like. The error monitor 222 is further configured to generate an API error snapshot group based on the detected error condition. The API error snapshot group includes the intercepted request data, the intercepted first API data, service configurations associated with the set of services, and deployment configurations associated with the set of containers.
[0068] The error monitor 222 is configured to initiate the debugging environment 224 based on the generation of the API error snapshot group. The debugging environment 224 is configured to replicate the execution conditions under which an error occurred in the production environment 204, thereby enabling targeted diagnostics and resolution of the error condition. The error monitor 222 is configured to deploy a third service 226 and a third pod 228 in the debugging environment 224. The third service 226 is configured to serve as a network endpoint abstraction enabling internal routing to the third pod 228. The error monitor 222 is further configured to instantiate a third container 228A in the third pod 228. In an embodiment, the third container 228A encapsulates the application binary, runtime dependencies, environment variables, and configuration files corresponding to the core microservice. Further, the third container 228A is configured to host the core microservice that may be identical to the first microservice within the first container 218A. This arrangement ensures that the execution within the debugging environment is functionally equivalent to the conditions under which the original error was detected.
[0069] The error monitor 222 is further configured to initiate a debug API simulator 230 in the debugging environment 224. Based on the initiation of the debug API simulator 230 and the instantiation of the third container 228A, the error monitor 222 is further configured to simulate API calls (e.g., the first API call and the second API call) in the debugging environment 224. In an embodiment, the debug API simulator 230 is configured to simulateAPI requests associated with non-core microservices. For example, if the third container 228A generates an API request to an inventory-check service or a user-preferences microservice, the debug API simulator 230 is configured to simulate a synthetic API response that may be contextually identical to an API response generated by a non-core microservice. The synthetic API response may include structured payloads (e.g., JavaScript Object Notation (JSON) or Extensible Markup Language (XML)), appropriate HTTP status codes (e.g., 200, 404, 503), response headers, and timing characteristics consistent with observed production behavior. Thus, the debug API simulator 230 ensures that API interactions within the debugging environment 224 remain consistent with real-world conditions, enabling effective error reproduction.
[0070] In operation, the error monitor 222 is configured to intercept the request data between the ingress 212 and the set of services. The error monitor 222 is further configured to intercept API data associated with an API call between the set of pods and the set of services. The error monitor 222 is further configured to monitor a service log of each pod based on the intercepting of the API data. Further, the error monitor 222 is configured to detect an error condition associated with the monitored service log. Additionally, the error monitor 222 is further configured to generate the API error snapshot group based on the detected error condition. The API error snapshot group includes the first API snapshot and the second API snapshot. The error monitor 222 is further configured to initiate the debugging environment 224 based on the generated API error snapshot group.
[0071] FIGs. 3A and 3B are diagrams that collectively illustrate exemplary operations for error snapshot generation, in accordance with an embodiment of the disclosure. FIGs. 3A and 3B are explained in conjunction with elements from FIG. 1, and FIG. 2. With reference to FIGs. 3A and 3B, there is shown a block diagram 300 that illustrates exemplary operations from 302 to 322, as described herein. The exemplary operations illustrated in the block diagram 300 may start at 302 and may be performed by any computing system, apparatus, or device, such as by the computer 102 of FIG. 1 or the system 202 of FIG. 2. Although illustrated with discrete blocks, the exemplary operations associated with one or more blocks of the block diagram 300 may be divided into additional blocks, combined into fewer blocks, or eliminated, depending on the particular implementation.
[0072] At 302, a data interception operation may be executed. In the data interception operation, the error monitor 222 is configured to intercept the request data transmitted between the ingress 212 and the set of services (e.g., the first service 214 and the second service 216). The ingress 212 corresponds to a gateway or entry point, routing externally initiated requests to appropriate backend services. Further, the set of services is configured to provide stable Internet Protocol (IP) address and Domain Name System (DNS) name, ensuring consistent access to the set of pods (e.g., the first pod 218 and the second pod 220) deployed within the production environment 204. The intercepted request data may include, but is not limited to, HTTP methods (e.g., POST, GET), API paths (e.g., / place-order), query parameters, HTTP headers, request payloads (e.g., JSON-encoded data), and contextual metadata such as request timestamps and user agent identifiers.
[0073] In an embodiment, when a customer initiates an HTTP POST request to / place-order from a client application, the ingress 212 routes the request to a backend service associated with a first pod 218. The error monitor 222 intercepts this request before the request is delivered to the target containerized microservice (e.g., a core microservice hosted within a first container218A). The intercepted request data may include POST / placeorder along with a request body such as {"userid": "101", "itemld": "202", "quantity": 2}.
[0074] The error monitor 222 is further configured to intercept the API data associated with internal communications between the set of pods via the set of services. For the sake of brevity, it is assumed that a microservice deployed in the first container 218A initiates a first API call to an additional microservice hosted within the second container 220A via the second service 216. Further, the error monitor 222 intercepts the first API data (e.g., API request data and API response data) exchanged as part of the first API call. For example, a core microservice in the first container 218A may call an endpoint such as GET / user-preferences?userld=U001, which is exposed by a non-core microservice running in the second container 220A. This internal communication may be facilitated through the second service 216, which acts as a network endpoint for the second pod 220. In this case, the first API data may include the internal request path (GET / user-preferences), request parameters (userld=U001 ), and the response payload (e.g., user settings in JSON). Thus, the error monitor 222 acts as an interception layer that intercepts the request data and the first API data within the production environment 204. Intercepted data (e.g., the request data and the first API data) is retained for subsequent operation, as discussed in subsequent steps.
[0075] In an embodiment, the first API data may further include HTTP request method (e.g., GET or POST), query parameters, request headers, request body, response status code (e.g., 200 or 503), response header, and image information associated with each container of the set of containers. Although the error monitor 222 is shown outside the production environment 204, in various embodiments, the error monitor 222 may be integrated within the production environment 204.
[0076] At 304, a snapshot generation operation may be executed. In the snapshot generation operation, the error monitor 222 is configured to generate a first API snapshot based on the intercepting of the request data and the first API data. The first API snapshot corresponds to a structured data record that preserves the state and the context of the first API call at the time of its execution. The error monitor 222 is further configured to extract service configurations associated with the set of services. The service configurations may include metadata and runtime parameters related to the set of services, including port bindings (e.g., 8080:80), service names (e.g., order-service, user-preferences-service), internal routing rules, environment-specific service URLs, and load balancing policies. By way of example, and not by limitation, the service configurations may include that the first service 214 associated with the core microservice exposes an endpoint / place-order. Further, the service configurations may include that the first service 214 is configured with a timeout of 5 seconds and implements round-robin routing.
[0077] The error monitor 222 is further configured to extract deployment configurations associated with the set of containers (e.g., the first container 218A and the second container 220A). The deployment configurations may correspond to a structured set of parameters that govern how the set of containers operates within the production environment 204. In an embodiment, the deployment configurations may be defined using declarative infrastructure-as-code files, such as Yet Another Markup Language (YAML) based Kubernetes® manifest files, including but not limited to, deployment.yaml, configmap.yaml, and statefulset.yaml. The deployment configurations may further include container image versions (e.g., core-service:v3.1.0), environment variables (e.g., REGION=us-east-1, FEATURE_FLAG_X=true) resource constraints (e.g., CPU / memory limits), and restart policies associated with the set of containers.
[0078] The error monitor 222 is further configured to retrieve the first PV data associated with the first pod 218. In an embodiment, the first PV data may be stored in the first PV. The first PV corresponds to a storage abstraction in container orchestration environments that provide persistent data storage that is independent of the lifecycle of pods (e.g., the set of pods). Thus, the first PV remains intact and can be reattached to the same or different pod, enabling stateful applications to preserve data across restarts. The first PV data may include filebased artifacts or database storage required during the processing of an API request (e.g., the first API request). For example, the core microservice deployed in the first container 218A may store user-specific session files, cache data, transaction logs, or temporary computation artifacts in the first PV. This data may be used for accurately reproducing and debugging errors that depend on stateful conditions. In an embodiment, the first API snapshot further includes the deployment configurations and the first PV data.
[0079] At 306, an incremental storage operation may be executed. In the incremental storage operation, the error monitor 222 is configured to intercept second API data associated with a second API call. The second API call may be between the second pod 220 and a fourth service of the production environment 204. The interception of the second API data may be based on the generation of the first API snapshot. The error monitor 222 is further configured to generate a second API snapshot based on the intercepted second API data.
[0080] The second API snapshot corresponds to a structured data record that preserves the state and context of the second API call at the time of its execution. The error monitor 222 is further configured to retrieve the second PV data associated with the second pod 220. In an embodiment, the second PV data may be stored in a second PV. The second PV corresponds to a storage abstraction in container orchestration environments that provide persistent data storage that is independent of lifecycle of pods (e.g., the set of pods). Thus, the second PV remains intact and can be reattached to the same or different pod, enabling stateful applications to preserve data across restarts. The second PV data may include file-based artifacts or database storage required during processing of an API request (e.g., the second API request). For example, the non-core microservice deployed in the second container 220A may store user-specific session files, cache data, transaction logs, or temporarycomputation artifacts in the second PV. This data may be used for accurately reproducing and debugging errors that depend on stateful conditions.
[0081] In an embodiment, the generation of the second API snapshot may be identical to the generation of the first API snapshot. However, the second API snapshot is generated based on an incremental data storage approach such that the second API snapshot may only include data that was not previously captured within the first API snapshot. Thus, the error monitor 222 avoids redundancy based on the incremental data storage approach. For example, the second API snapshot may omit the request data, the service configurations, and the deployment configurations.
[0082] This incremental data storage approach reduces memory overhead and improves storage efficiency by eliminating the need to store repeated service configuration or deployment configuration data already included in the first API snapshot. The use of incremental snapshots ensures that each snapshot contributes unique diagnostic information relevant to its associated API call while collectively enabling a complete reconstruction of the execution flow during error analysis. This selective data capture enhances storage scalability and streamlined debugging.
[0083] At 308, a service log monitoring operation may be executed. In the service log monitoring operation, the error monitor 222 is configured to monitor a service log associated with each pod of the set of pods based on the generation of the API snapshot. Each service log is a sequential record of execution events generated by containerized microservices deployed within the corresponding container (e.g., the first container 218A or the second container 220A). The service log may include diagnostic and operational data such as method invocation traces, exception stack traces, log-level entries (e.g., DEBUG, INFO, ERROR), timestamps, database query logs, inter-service communication metadata, and application-specific debug messages.
[0084] In an embodiment, the error monitor 222 is configured to detect error conditions by searching for predefined error-related keywords (e.g., "Exception,” "Error,” "NullReference,” or "Timeout”) within the service logs. Additionally, the error monitor 222 is further configured to flag an error condition if the HTTP response status code recorded in the service log is not equal to 200, indicating that the request was unsuccessful.
[0085] In various embodiments, the error monitor 222 is further configured to detect error conditions by observing abnormal pod behaviors. For example, the error monitor 222 may detect if a pod undergoes an unexpected restart that may be triggered based on a container crash or an Out of Memory condition. Further, the error monitor 222 may identify instances where a pod becomes unresponsive or enters a "CrashLoopBackOff” or "stuck” state, signifying that the underlying service has failed to start or proceed with the execution. Additionally, the error monitor 222 is further configured to determine timeout-related conditions from the service log. For example, if the service log (or a service log entry) shows a request to an internal API (e.g., GET / inventory-status) that fails due to an exceeded response time threshold (e.g., 30 seconds), the error monitor 222 flags this as a potential fault. Thelog may additionally include metrics such as retry attempts, degraded dependencies, or degraded service-level agreement (SLA) adherence that may contribute to identifying latent issues.
[0086] At 310, it may be determined whether the error condition is present. The error monitor 222 is configured to determine whether error conditions are present in service logs (e.g., the first service log 218B and the second service log 220B) based on the monitoring of the service logs. The determination may be based on a variety of detection mechanisms such as the presence of predefined error-related keywords (e.g., "Exception,” "Error,” "Timeout”), the occurrence of non-successful status codes (e.g., HTTP status codes 503 (Service unavailable) and 505 (HTTP Version Not Supported)), pod-level lifecycle events such as restarts or unresponsiveness, or conditions indicating request timeouts or deadlocks. In an embodiment, the error monitor 222 may utilize rule-based pattern matching to scan for the error condition in real-time or near real-time without requiring the monitoring of the service logs. In case the service logs do not include the error condition, the control may pass to 312. Alternatively, in case the service log may include the error conditions, the control may pass to 314. Although it is mentioned that the error monitor 222 monitors the service logs, in various embodiments, the error monitor 222 may integrate with distributed tracing tools or performance monitoring agents to detect abnormal latency spikes or SLA violations, which may serve as indicators of the error condition.
[0087] At 312, a snapshot deletion operation may be executed. In the snapshot deletion operation, the error monitor 222 is configured to delete API snapshots (e.g., the first API snapshot and the second API snapshot) associated with API calls (e.g., the first API call and the second API call). The API snapshots are deleted in response to the determination that error conditions are absent in the service logs. In an embodiment, the error monitor 222 deletes the API snapshots to optimize memory utilization. Following the snapshot deletion operation, the error monitor 222 is further configured to reinitiate the data interception operation 302 for an upcoming API chain. Thus, the error monitor 222 iteratively intercepts API data associated with API calls of API chains.
[0088] At 314, an error snapshot group generation operation may be executed. In the error snapshot group generation operation, the error monitor 222 is configured to generate an API error snapshot group based on the presence of the error conditions in the service logs (e.g., the first service log 218B or the second service log 220B). In an embodiment, the API error snapshot group corresponds to a collection of multiple API snapshots associated with an API chain or a sequence of API calls. For example, the API error snapshot group may include the first API snapshot associated with the first API call between the first pod 218 and the second service 216. Additionally, the API error snapshot group may further include the second API snapshot associated with the second API call between the second pod 220 and the fourth service of the production environment 204. The generation of the API error snapshot group captures a detailed, time-ordered record of execution and service communications leading up to the error conditions, thereby enabling accurate reconstruction of API chains or API calls for debugging.
[0089] At 316, a debugging environment initiation operation may be executed. In the debugging environment initiation operation, the error monitor 222 is configured to initiate the debugging environment 224 based on the generation of the API error snapshot group. In an embodiment, the debugging environment 224 is initiated within a temporary namespace provisioned by an orchestration platform, such as a Kubernetes® cluster. The error monitor 222 is further configured to dynamically generate the temporary namespace. Further, the error monitor 222 is configured to name the temporary namespace based on a unique identifier that may be associated with the API error snapshot group (e.g., timestamp combined with error type). For example, a namespace may be named "202411021232-post-api-nullpointer-error” to uniquely represent a specific error condition associated with the API chain that includes the first API call and the second API call.
[0090] At 318, a debugging environment configuration operation may be executed. In the debugging environment configuration operation, the error monitor 222 is configured to deploy the third pod 228 in the initiated debugging environment 224. The third pod 228 may be deployed based on the API error snapshot group. The error monitor 222 is further configured to deploy the third service 226 in the initiated debugging environment 224. The third service 226 may serve as a network endpoint abstraction enabling internal routing to the third pod 228.
[0091] The error monitor 222 is further configured to retrieve (or pull) a set of container images associated with the set of containers from the database 208. In an embodiment, the database 208 may correspond to a centralized storage system where container images (e.g., the set of container images) may be stored, managed, and distributed. The database 208 may allow developers (such as the user 232) to upload, store, and pull the container images. The one or more database 208 may correspond to a public image repository or a private image repository. The public image repository may include platforms such as Docker Hub®, Harbor®, and the like, which host publicly available images. The set of container images may be retrieved based on the deployment configurations included in the API error snapshot group. In an embodiment, the API error snapshot group may include the image information (e.g., image tags, hash digests, or version identifiers) associated with each container of the set of containers (e.g., the first container 218A and the second container 220A) in the production environment 204. The error monitor 222 is further configured to verify the retrieved set of container images based on the image information. For example, the deployment configurations may specify a container image with a "latest" tag. Further, an image used in the production environment 204 may correspond to a specific version tag (e.g., v2.3.4). Thus, by comparing the retrieved container image with the image information extracted from the API error snapshot group, the error monitor 222 ensures that containers (e.g., the third container 228A) instantiated in the debugging environment 224 are identical to containers instantiated in the production environment 204, thereby eliminating inconsistencies to ensure the error conditions are reproduced precisely for effective debugging.
[0092] The error monitor 222 is further configured to instantiate the third container 228A in the third pod 228. The third container 228A may be instantiated based on the verified set of container images and corresponding PV data (e.g., the first PV data) to replicate the first container 218A. In an embodiment, the third container 228Aencapsulates the application binary, runtime dependencies, environment variables, and configuration files corresponding to the core microservice. Further, the third container 228A is configured to host the core microservice that may be identical to the first microservice within the first container 218A.
[0093] At 320, an API call simulation operation may be executed. In the debugging environment configuration operation, the error monitor 222 is configured to initiate the debug API simulator 230 in the debugging environment 224. Based on the initiation of the debug API simulator 230 and the instantiation of the third container 228A, the error monitor 222 is further configured to simulate API calls (e.g., the first API call and the second API call) in the debugging environment 224. In an embodiment, the debug API simulator 230 is configured to simulate API requests associated with non-core microservices. For example, if the third container 228A generates an API request to an inventory-check service or a user-preferences microservice, the debug API simulator 230 is configured to simulate a synthetic API response that may be contextually identical to an API response generated by a non-core microservice. The synthetic API response may include structured payloads (e.g., JSON or XML), appropriate HTTP status codes (e.g., 200, 404, 503), response headers, and timing characteristics consistent with observed production behavior. Thus, the debug API simulator 230 ensures that API interactions within the debugging environment 224 remain consistent with real-world conditions, enabling effective error reproduction. The error monitor 222 is further configured to generate simulation results for the simulated API calls. In an embodiment, the simulation result may include, but is not limited to, the API request payload, the API response payload, HTTP headers, status codes, execution traces, timing logs, stack traces, exception messages, environment variables, and resource utilization metrics that may be observed during the API call simulation operation.
[0094] At 322, a rendering operation may be executed. In the rendering operation, the error monitor 222 is configured to render the information (e.g., the simulation result) associated with the simulated API call on the user device 206 to debug the API call (e.g., the first API call and the second API call). The rendering operation enables the user 232 (e.g., a developer, system administrator, or quality assurance engineer) to interact with and analyze the simulated execution of the API chain. In an embodiment, the error monitor 222 may render the information associated with the simulated API call via an integrated development environment (IDE), a web-based dashboard, or a specialized debugging interface. In various embodiments, the error monitor 222 may render the information in different structured formats (e.g., JSON or XML) that may be compatible with visual debugging tools. The visual debugging tools may present the rendered information through a visual and interactive interface that enables the user 232 to examine and debug the API calls associated with the error conditions in the production environment 204.
[0095] Although it is mentioned that the error monitor 222 is configured to perform the debugging environment configuration operation, the API call simulation operation, and the rendering operation, in various embodiments the debugging environment 224 may further include a controller. The controller may be configured to perform the debugging environment configuration operation, the API call simulation operation, and the rendering operation.
[0096] FIG. 4 is a diagram that illustrates an exemplary representation 400 of an error snapshot group for an API chain, in accordance with an embodiment of the disclosure. FIG. 4 is explained in conjunction with elements from FIG. 1, FIG. 2, FIG. 3A, and FIG. 3B. The exemplary representation 400 includes an API chain 402 generated by the production environment 204.
[0097] The API chain 402 includes a sequential flow of interconnected API calls, including a first API call 404, a second API call 406, and a third API call 408. Each API call may represent a distinct communication instance between the set of pods via the set of services within the production environment 204. In an embodiment, the API chain 402, reflects a transactional or functional flow wherein the output of one API call acts as the input or trigger for the subsequent API call. For example, the first API call 404 may correspond to a user authentication service, the second API call 406 may invoke an inventory management service, and the third API call 408 may correspond to a recommendation engine or checkout module.
[0098] The error monitor 222 is configured to generate an API snapshot associated with each API call of the API chain 402. Further, the error monitor 222 is configured to monitor a service log associated with each pod of the set of pods based on the generation of the API snapshot. In an embodiment, the error monitor 222 is configured to detect error conditions associated with the monitored service log. Based on the detection of the error condition during the execution of the API chain 402, the error monitor 222 is further configured to generate an API error snapshot group 410. The API error snapshot group 410 includes discrete snapshots captured at various stages of the API chain, including a first API snapshot 412, a second API snapshot 414, and a third API snapshot 416. Each snapshot may include intercepted request data, response data, status codes, service configurations, deployment parameters, and persistent volume data associated with the corresponding API call.
[0099] The first API snapshot 412 is generated based on the interception of the first API call 404, capturing the initial runtime state and relevant metadata. Further, the second API snapshot 414 is generated based on the interception of the second API call 406. Additionally, the third API snapshot 416 is generated based on the interception of the third API call 408. In an embodiment, the error monitor 222 applies the incremental data storage approach to reduce memory overhead and improve storage efficiency by eliminating the need to store redundant data or configuration (e.g., service configuration or deployment configuration data) for each snapshot. Further, based on the API error snapshot group, the error monitor 222 is further configured to initiate the debugging environment 224. The debugging environment 224 may be initiated to debug the API calls of the API chain 402. Details about the debugging of the API calls are provided, for example, in FIG. 2, FIG. 3A, and FIG. 3B.
[0100] FIGs. 5A and 5B are diagrams that collectively illustrate a flowchart of an exemplary method for error snapshot generation, in accordance with an embodiment of the disclosure. FIGs. 5A and 5B are explained in conjunction with elements from FIG. 1, FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4. With reference to FIGs. 5A and 5B, there is shown a flowchart 500. The operations of the exemplary method may be executed by any computingsystem, for example, by the computer 102 of FIG. 1 or the system 202 of FIG. 2. The operations of the flowchart 500 may start at 502.
[0101] At 502, the request data is intercepted. In an embodiment of the disclosure, the system 202 is configured to intercept the request data transmitted between the ingress 212 and the set of services (e.g., the first service 214 and the second service 216). The ingress 212 corresponds to a gateway or entry point, routing externally initiated requests to appropriate backend services. Further, the set of services is configured to provide stable IP address and Domain Name System (DNS) name, ensuring consistent access to the set of pods (e.g., the first pod 218 and the second pod 220) deployed within the production environment 204. The intercepted request data may include, but is not limited to, HTTP methods (e.g., POST, GET), API paths (e.g., / place-order), query parameters, HTTP headers, request payloads (e.g., JSON-encoded data), and contextual metadata such as request timestamps and user agent identifiers. Details about the interception of the request data are provided, for example, in FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4.
[0102] At 504, the API data is intercepted. In an embodiment of the disclosure, the system 202 is configured to intercept the API data. The API data may be associated with internal communications between the set of pods via the set of services. For the sake of brevity, it is assumed that a microservice deployed in the first container 218A initiates a first API call to a different microservice hosted within the second container 220A via the second service 216. Further, the error monitor 222 intercepts the first API data (e.g., API request data and API response data) exchanged as part of the first API call. Details about the interception of the API data are provided, for example, in FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4.
[0103] At 506, the API snapshot is generated. In an embodiment of the disclosure, the system 202 is further configured to generate the API snapshot (e.g., the first API snapshot and the second API snapshot) based on the intercepting of the request data and the API data associated with the API call (e.g., the first API call and the second API call). The API snapshot corresponds to a structured data record that preserves state and context of the API call at the time of its execution. The error monitor 222 is further configured to extract service configurations associated with the set of services. Details about the generating of the API snapshot are provided, for example, in FIG. 2, FIG.3A, FIG. 3B, and FIG. 4.
[0104] At 508, the service log is monitored. In an embodiment of the disclosure, the system 202 is further configured to monitor a service log associated with each pod of the set of pods based on the generation of the API snapshot. Each service log is a sequential record of execution events generated by containerized microservices deployed within the corresponding container (e.g., the first container 218A or the second container 220A). The service log may include diagnostic and operational data such as method invocation traces, exception stack traces, log-level entries (e.g., DEBUG, INFO, ERROR), timestamps, database query logs, inter-service communicationmetadata, and application-specific debug messages. Details about the monitoring of the service log are provided, for example, in FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4.
[0105] At 510, the error condition is detected. In an embodiment of the disclosure, the system 202 is further configured to detect error conditions associated with the monitored service log. In an embodiment, the error monitor 222 is configured to detect error conditions by searching for predefined error-related keywords (e.g., "Exception,” "Error,” "NullReference,” or "Timeout”) within the monitored service log. In various embodiments, the error monitor 222 is further configured to detect error conditions by observing abnormal pod behaviors. Details about the detection of the error condition are provided, for example, in FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4.
[0106] At 512, the API error snapshot group is generated. In an embodiment of the disclosure, the system 202 is further configured to generate an API error snapshot group based on the presence of the error conditions in the service logs (e.g., first service log 218B or the second service log 220B). In an embodiment, the API error snapshot group corresponds to a collection of multiple API snapshots associated with an API chain or a sequence of API calls. For example, the API error snapshot group may include the first API snapshot associated with the first API call between the first pod 218 and the second service 216. Additionally, the API error snapshot group may further include the second API snapshot associated with the second API call between the second pod 220 and the fourth service of the production environment 204. Details about the generation of the API error snapshot group are provided, for example, in FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4.
[0107] At 514, the debugging environment 224 is initiated to debug the API call. In an embodiment of the disclosure, the system 202 is further configured to initiate the debugging environment 224 for debugging the API call. The debugging environment 224 may be initiated based on the generation of the API error snapshot group associated with the API chain (e.g., the first API call and the second API call). In an embodiment, the debugging environment 224 is initiated within a temporary namespace provisioned by an orchestration platform, such as a Kubernetes® cluster. The error monitor 222 is further configured to dynamically generate the temporary namespace. Further, error monitor 222 is configured to name the temporary namespace based on a unique identifier that may be associated with the API error snapshot group (e.g., timestamp combined with error type). Details about the initiating of the debugging environment 224 are provided, for example, in FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4.
[0108] At 516, a pod is initiated in the debugging environment 224. In an embodiment of the disclosure, the system 202 is further configured to deploy a pod (e.g., the third pod 228) in the initiated debugging environment 224. The pod may be deployed based on the API error snapshot group. Details about the initiating of the pod are provided, for example, in FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4.
[0109] At 518, a service is initiated in the debugging environment 224. In an embodiment of the disclosure, the system 202 is further configured to deploy a service (e.g., the third service 226) in the initiated debugging environment 224. The third service 226 may serve as a network endpoint abstraction enabling internal routing to the third pod 228. Details about the initiating of the service are provided, for example, in FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4.
[0110] At 520, the container images are retrieved. In an embodiment of the disclosure, the system 202 is further configured to retrieve the container images (e.g., a set of container images) associated with the containers (e.g., the set of containers). The container images may be retrieved based on the deployment configurations included in the API error snapshot group. In an embodiment, the API error snapshot group may include the image information (e.g., image tags, hash digests, or version identifiers) associated with each container of the containers (e.g., the first container 218A and the second container 220A) in the production environment 204. The system is further configured to verify the retrieved set of container images based on the image information. Details about the retrieving of the container images are provided, for example, in FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4.
[0111] At 522, a container is instantiated. In an embodiment of the disclosure, the system 202 is further configured to instantiate a container (e.g., the third container 228A). The container may be instantiated based on the retrieved container images and the corresponding PV data (e.g., the first PV data). In an embodiment, the container encapsulates the application binary, runtime dependencies, environment variables, and configuration files corresponding to the core microservice. Further, the container is configured to host the core microservice that may be identical to a core microservice within the production environment 204. Details about the instantiation of the container are provided, for example, in FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4.
[0112] At 524, the debug API simulator 230 is initiated. In an embodiment of the disclosure, the system 202 is further configured to initiate the debug API simulator 230 in the debugging environment 224. Based on the initiation of the debug API simulator 230 and the instantiation of the container, the error monitor 222 is further configured to simulate the API call (e.g., the first API call and the second API call) in the debugging environment 224. In an embodiment, the debug API simulator 230 is configured to simulate API requests associated with noncore microservices. Details about the initiation of the debug API simulator 230 are provided, for example, in FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4.
[0113] At 526, the API call is simulated. In an embodiment of the disclosure, the system 202 is further configured to simulate the API call (e.g., the first API call and the second API call) in the debugging environment 224. The API call may be associated with the API chain. In an embodiment, the debug API simulator 230 is configured to simulate API requests associated with non-core microservices. For example, if the third container 228A generates an API request to an inventory-check service or a user-preferences microservice, the debug API simulator 230 is configured to simulate a synthetic API response that may be contextually identical to an APIresponse generated by a non-core microservice. Details about the simulation of the API chain are provided, for example, in FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4.
[0114] At 528, information associated with the API call is rendered. In an embodiment of the disclosure, the system 202 is further configured to render the information (e.g., the simulation result) associated with the API call (e.g., the first API call and the second API call) on the user device 206 to debug the API call. The rendering operation enables the user 232 (e.g., a developer, system administrator, or quality assurance engineer) to interact with and analyze the simulated execution of the API call in the API chain. In an embodiment, the error monitor 222 may render the information associated with the API call via an integrated development environment (IDE), a webbased dashboard, or a specialized debugging interface. Details about the rendering of the API call are provided, for example, in FIG. 2, FIG. 3A, FIG. 3B, and FIG. 4.
[0115] The descriptions of the various embodiments of the disclosure have been presented for purposes of illustration but are not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over technologies found in the marketplace, or to enable a reader of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
CLAIMS1. A computer-implemented method, comprising:intercepting, by a computer, request data exchanged between an application programming interface (API) gateway and a first service of a set of services;intercepting, by the computer, first API data associated with a first API call based on the intercepting of the request data, wherein:the first API call is between a first pod of a set of pods and a second service of the set of services, the first pod comprises a container of a set of containers, andeach pod of the set of pods is associated with a corresponding service of the set of services: monitoring, by the computer, a service log of the first pod based on the intercepting of the first API data; detecting, by the computer, an error condition associated with the monitored service log; generating, by the computer, an API error snapshot group based on the detected error condition, wherein the generated API error snapshot group comprises:the intercepted request data,the intercepted first API data,service configurations associated with the set of services, anddeployment configurations associated with the set of containers; andinitiating, by the computer, a debugging environment based on the generated API error snapshot group, wherein the initiating of the debugging environment is for debugging the first API call.
2. The computer-implemented method of claim 1 , further comprising:generating, by the computer, a first API snapshot based on the intercepting of the first API data, wherein the first API snapshot comprises:the intercepted first API data,the service configurations, andthe deployment configurations; andmonitoring, by the computer, the service log based on the generated first API snapshot.
3. The computer-implemented method of claim 2, further comprising:intercepting, by the computer, second API data associated with a second API call based on the intercepting of the first API data, wherein the second API call is between a second pod of the set of pods and a third service of the set of services; andgenerating, by the computer, a second API snapshot based on the intercepting of the second API data, wherein:the second API snapshot comprises the intercepted second API data, andthe generated API error snapshot group comprises the first API snapshot and the second API snapshot.
4. The computer-implemented method of claim 1, further comprising retrieving, by the computer, persistent volume (PV) data associated with the first pod based on the intercepting of the first API data, wherein the generated API error snapshot group further comprises the retrieved PV data.
5. The computer-implemented method of claim 4, further comprising:deploying, by the computer, a specific pod in the initiated debugging environment based on the generated API error snapshot group;retrieving, by the computer, a set of container images associated with the set of containers based on the deployment configurations and the deploying of the specific pod; andinstantiating, by the computer, a test container based on a container image of the retrieved set of container images and the retrieved PV data, wherein the test container is identical to the container of the set of containers.
6. The computer-implemented method of claim 5, further comprising deploying, by the computer, a specific service in the initiated debugging environment based on the generated API error snapshot group, wherein the deployed specific service provides a network endpoint for the deployed specific pod.
7. The computer-implemented method of claim 5, further comprising:initiating, by the computer, a debug API simulator in the initiated debugging environment; simulating, by the computer, the first API call in the initiated debugging environment based on the instantiating of the test container and the initiated debug API simulator; andrendering, by the computer, information associated with the simulated first API call on a user device to debug the first API call.
8. The computer-implemented method of claim 5, wherein:the intercepted first API data comprises image information associated with each container image of the set of container images, andthe computer-implemented method further comprises retrieving, by the computer, the set of container images based on the deployment configurations and the image information.
9. The computer-implemented method of claim 1 , further comprising:monitoring, by the computer, the service log, a status code associated with the first API call, and a lifecycle of the first pod; anddetecting, by the computer, the error condition associated with at least one of the monitored service log, the monitored status code, or the monitored lifecycle of the first pod.
10. The computer-implemented method of claim 1, wherein the intercepted first API data comprises at least one of:a method associated with the first API call,API request data associated with the first API call,API response data associated with the first API call,a path associated with the first API call,a status code associated with the first API call, orimage information associated with each container of the set of containers.
11. A computer system, comprising:a processor set;one or more computer-readable storage media; andprogram instructions stored on the one or more computer-readable storage media, the program instructions executable by the processor set to cause the processor set to:intercept request data exchanged between an application programming interface (API) gateway and a first service of a set of services;intercept first API data associated with a first application programming interface (API) call based on the interception of the request data, wherein:the first API call is between a first pod of a set of pods and a second service of the set of services, the first pod comprises a container of a set of containers, andeach pod of the set of pods is associated with a corresponding service of the set of services; monitor a service log of the first pod based on the interception of the first API data;detect an error condition associated with the monitored service log;generate an API error snapshot group based on the detected error condition, wherein the generated API error snapshot group comprises:the intercepted first API data,service configurations associated with the set of services, anddeployment configurations associated with the set of containers;initiate a debugging environment based on the generated API error snapshot group;simulate the first API call in the initiated debugging environment; andrender information associated with the simulated first API call on a user device to debug the first API call.
12. The computer system of claim 11, wherein the program instructions further cause the processor set to: generate a first API snapshot based on the interception of the first API data, wherein the first API snapshot comprises:the intercepted first API data,the service configurations, andthe deployment configurations; andmonitor the service log based on the generated first API snapshot.
13. The computer system of claim 12, wherein the program instructions further cause the processor set to: intercept second API data associated with a second API call based on the interception of the first API data, wherein the second API call is between a second pod of the set of pods and a third service of the set of services; and generate a second API snapshot based on the interception of the second API data, wherein:the second API snapshot comprises the intercepted second API data, andthe generated API error snapshot group comprises the first API snapshot and the second API snapshot.
14. The computer system of claim 11, wherein the program instructions further cause the processor set to retrieve persistent volume (PV) data associated with the first pod based on the interception of the first API data, and wherein the generated API error snapshot group further comprises the retrieved PV data.
15. The computer system of claim 14, wherein the program instructions further cause the processor set to: deploy a specific pod in the initiated debugging environment based on the generated API error snapshot group;retrieve a set of container images associated with the set of containers based on the deployment configurations and the deployment of the specific pod; andinstantiate a test container based on a container image of the retrieved set of container images, and the retrieved PV data, wherein the test container is identical to the container of the set of containers.
16. The computer system of claim 15, wherein the program instructions further cause the processor set to deploy a specific service in the initiated debugging environment based on the generated API error snapshot group, and wherein the deployed specific service provides a network endpoint for the deployed specific pod.
17. The computer system of claim 15, wherein the program instructions further cause the processor set to: initiate a debug API simulator in the initiated debugging environment; andsimulate the first API call in the initiated debugging environment based on the instantiation of the test container and the initiated debug API simulator.
18. The computer system of claim 15, wherein:the intercepted first API data comprises image information associated with each container image of the set of container images, andthe program instructions further cause the processor set to retrieve the set of container images based on the deployment configurations and the image information.
19. The computer system of claim 11, wherein the program instructions further cause the processor set to: monitor the service log, a status code associated with the first API call, and a lifecycle of the first pod; anddetect the error condition associated with at least one of the monitored service log, the monitored status code, or the monitored lifecycle of the first pod.
20. A computer-program product for error snapshot generation for debugging an application programming interface (API) call, the computer-program product comprising:one or more computer-readable storage media; andprogram instructions stored on the one or more computer-readable storage media to perform operations comprising:intercepting request data exchanged between an API gateway and a first service of a set of services; intercepting first API data associated with a first API call based on the intercepting of the request data, wherein:the first API call is between a first pod of a set of pods and a second service of the set of services, the first pod comprises a container of a set of containers, andeach pod of the set of pods is associated with a corresponding service of the set of services; monitoring a service log of the first pod based on the intercepting of the first API data;detecting an error condition associated with the monitored service log;generating an API error snapshot group based on the detected error condition, wherein the generated API error snapshot group comprises:the intercepted request data,the intercepted first API data,service configurations associated with the set of services, anddeployment configurations associated with the set of containers; andinitiating a debugging environment based on the generated API error snapshot group, wherein the initiating of the debugging environment is for debugging the first API call.
