CIL Code Instrumentation for Automatic Dependency Discovery
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Operations teams face challenges in managing and performing change control and impact analysis for applications due to unclear application topologies and infrastructures, especially in distributed applications with complex interactions across different languages and machines, leading to labor-intensive and error-prone dependency discovery processes.
Innovation Solution
The method involves dynamic call tracing using Common Intermediate Language (CIL) code instrumentation at compile time or runtime to automatically discover application component dependencies by extracting addresses of external service providers and publishing dependency information to a management system for building a dependency map.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If manual dependency discovery through blueprints is used, then dependency information can be obtained, but the process becomes labor intensive and error prone
Solution Approach 1:
The system performs self-discovery of dependencies by automatically instrumenting application code to trace calls to service providers. The application itself generates the dependency information through embedded tracing mechanisms, eliminating the need for manual blueprint creation and reducing both labor intensity and errors.
Solution Approach 2:
The manual mechanical process of creating and maintaining blueprints is replaced with automated code instrumentation and dynamic tracing. The system uses programmatic approaches to discover dependencies at runtime, substituting human effort with automated computational mechanisms.
2Reliability
If blueprints are updated manually with each application version, then dependency information remains current, but the process remains labor intensive and error prone
Solution Approach 1:
The dependency discovery process runs continuously at application runtime through embedded tracing. Rather than periodic manual updates, the system continuously monitors and discovers dependencies as the application executes, ensuring information remains current without interrupting operations.
Solution Approach 2:
Code instrumentation is performed in advance at compile time or application startup, preparing the tracing infrastructure before runtime. This preliminary setup enables automatic dependency capture throughout the application lifecycle without requiring updates at each version deployment.
3Productivity
If code instrumentation is performed at compile time, then dependency discovery is automated, but the application size increases
Solution Approach 1:
The instrumentation code is segmented into separate assemblies or modules that can be selectively loaded. Rather than embedding all tracing code directly into the main application binary, the system uses modular instrumentation that reduces the core application size while maintaining automated dependency discovery capabilities.
Solution Approach 2:
The instrumentation framework is designed as a universal, reusable component that can be applied to multiple applications. By sharing common tracing infrastructure across applications, the system reduces redundant code and minimizes the size overhead for each individual application.
4Measurement precision
If comprehensive tracing is implemented in distributed applications, then all dependencies are discovered, but system complexity increases
Solution Approach 1:
An intermediary tracing layer is introduced that sits between application components and service providers. This mediator captures dependency information centrally without requiring complex instrumentation in each individual component, simplifying the overall system architecture while maintaining comprehensive discovery.
Data Source
AI summary
Disclosed is a method allowing the automatic discovery of application component dependencies by tracing application calls to dependant resources. The call tracing is embedded dynamically in an application at runtime using Common Intermediate Language (“CIL”) code instrumentation at compile time or runtime. Such a method reads an instrumentation configuration file to determine an address extraction code portion that is to be instrumented to an application method code, locates the CIL method body for the application method that is to be instrumented, instruments the application method by inserting the address extraction code portion into the appropriate .NET Application or .NET library at either compile time or at run time, extracts the address of one or more external service providers from the designated .NET library methods responsible for communication during execution of the application method that was instrumented, publishes any newly discovered dependencies to a management system in the form of the discovery event, and causes the management system to build an application dependency map based on the resource address information obtained.


