Telemetry (also known as tele-metering) generally refers to the remote measurement of and data collection from a given entity. Telemetry can be used to monitor the ongoing operating status (e.g., the performance and health, along with other desired operational attributes) of many different types of entities. For example, telemetry is often used to monitor the operating status of specific computer programs. In addition to providing information about the ongoing operating status of a given computer program, telemetry data collected from the computer program can also provide information about the ecosystem in which the computer program operates.
Program instrumentation technique implementations described herein generally involve dynamically instrumenting computer programs to allow telemetry data to be collected therefrom. In one exemplary implementation an instrumentation manifest is received that includes metadata specifying one or more target functions existing within a target computer program which is installed on a computing device, where the metadata also specifies for each of the target functions one or more types of telemetry data to be collected from the target function. The instrumentation manifest is then utilized to insert code into each of the target functions whenever the target function is executed on the computing device, where this inserted code operates to collect the specified types of telemetry data from each of the target functions. The telemetry data collected by the inserted code is then stored.
In another exemplary implementation a request is received via a computer network from a target computing device to instrument a target computer program installed on the target computing device for telemetry data collection. An instrumentation manifest is then transmitted over the network to the target computing device, where this manifest includes metadata specifying one or more target functions existing within the target computer program, and the metadata also specifies for each of the target functions one or more types of telemetry data to be collected from the target function. The manifest is utilized to automatically insert code into each of the target functions whenever the target function is executed on the target computing device, where this inserted code operates to collect the specified types of telemetry data from each of the target functions.
It should be noted that the foregoing Summary is provided to introduce a selection of concepts, in a simplified form, that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter. Its sole purpose is to present some concepts of the claimed subject matter in a simplified form as a prelude to the more-detailed description that is presented below.
The specific features, aspects, and advantages of the program instrumentation technique implementations described herein will become better understood with regard to the following description, appended claims, and accompanying drawings where:
In the following description of program instrumentation technique implementations reference is made to the accompanying drawings which form a part hereof, and in which are shown, by way of illustration, specific implementations in which the program instrumentation technique can be practiced. It is understood that other implementations can be utilized and structural changes can be made without departing from the scope of the program instrumentation technique implementations.
It is also noted that for the sake of clarity specific terminology will be resorted to in describing the program instrumentation technique implementations described herein and it is not intended for these implementations to be limited to the specific terms so chosen. Furthermore, it is to be understood that each specific term includes all its technical equivalents that operate in a broadly similar manner to achieve a similar purpose. Reference herein to “one implementation”, or “another implementation”, or an “exemplary implementation”, or an “alternate implementation”, or “one version”, or “another version”, or an “exemplary version”, or an “alternate version”, or “one variant”, or “another variant”, or an “exemplary variant”, or an “alternate variant” means that a particular feature, a particular structure, or particular characteristics described in connection with the implementation/version/variant can be included in at least one implementation of the program instrumentation technique. The appearances of the phrases “in one implementation”, “in another implementation”, “in an exemplary implementation”, “in an alternate implementation”, “in one version”, “in another version”, “in an exemplary version”, “in an alternate version”, “in one variant”, “in another variant”, “in an exemplary variant”, and “in an alternate variant” in various places in the specification are not necessarily all referring to the same implementation/version/variant, nor are separate or alternative implementations/versions/variants mutually exclusive of other implementations/versions/variants. Yet furthermore, the order of process flow representing one or more implementations, or versions, or variants of the program instrumentation technique does not inherently indicate any particular order nor imply any limitations of the program instrumentation technique.
As utilized herein, the terms “component,” “system,” “client” and the like are intended to refer to a computer-related entity, either hardware, software (e.g., in execution), firmware, or a combination thereof. For example, a component can be a process running on a processor, an object, an executable, a program, a function, a library, a subroutine, a computer, or a combination of software and hardware. By way of illustration, both an application running on a server and the server can be a component. One or more components can reside within a process and a component can be localized on one computer and/or distributed between two or more computers. The term “processor” is generally understood to refer to a hardware component, such as a processing unit of a computer system.
Furthermore, to the extent that the terms “includes,” “including,” “has,” “contains,” variants thereof, and other similar words are used in either this detailed description or the claims, these terms are intended to be inclusive, in a manner similar to the term “comprising”, as an open transition word without precluding any additional or other elements.
The program instrumentation technique implementations described herein generally involve dynamically (e.g., on-the-fly) instrumenting a target computer program to allow telemetry data to be collected from the program while it is running (e.g., while it is being executed by one or more target computing devices). The term “computer program” is used herein to refer to a collection of software instructions that performs one or more specific tasks when executed by one or more computing devices. Accordingly and as is appreciated in the arts of software programming and computing, a computer program is also known as a software program. As is also appreciated in the arts of software programming and computing, computer programs can be classified along functional lines into two general categories, namely application programs and backend system programs. The term “application program” is used herein to refer to a computer program that is designed to perform one or more specific functions for the benefit of each end-user who runs the program. In other words, an application program is a computer program that is designed to help end-users perform one or more specific activities/tasks when the end-users run the program. Exemplary types of application programs include word processing programs, spreadsheet programs, email programs, personal information management programs, web browser programs, media playback and editing programs, computer-aided design (CAD) programs, and computer-aided engineering (CAE) programs, among many other types of application programs. The term “backend system program” on the other hand is used herein to refer to a computer program that is designed to provide one or more specific services to other computer programs. Backend system programs generally include the computer programs that are dedicated to managing the operation of computing devices themselves (e.g., operating systems, device drivers, file system utilities, user interface utilities, data communication and networking utilities, and the like).
The program instrumentation technique implementations described herein are advantageous for various reasons including, but not limited to, the following. As will be appreciated from the foregoing and the more-detailed description that follows, the program instrumentation technique implementations can be used to dynamically instrument any type of computer program for telemetry data collection. More particularly and by way of example but not limitation, in one implementation of the program instrumentation technique described herein the target computer program that is instrumented is an application program that is launched by a user. In another implementation of the program instrumentation technique the target computer program that is instrumented is a backend system program. The program instrumentation technique implementations can also be used to instrument both released and unreleased computer programs. More particularly, the program instrumentation technique implementations allow a new computer program that has not yet been released to production (e.g., a program that is still in development/alpha-stage testing or beta-stage testing) to be instrumented for telemetry data collection—in this case the collected telemetry data reflects testing usage of the program. The program instrumentation technique implementations also allow a legacy computer program that has already been released to production (e.g., the program has been released to “the wild” for public use) to be instrumented for telemetry data collection—in this case the collected telemetry data reflects real-world usage of the program.
Additionally, the telemetry data that is collected by the program instrumentation technique implementations described herein can be used for a wide range of ad-hoc computer program analytics. By way of example but not limitation, the collected telemetry data can be used to understand (e.g., characterize) the current performance of the target computer program that is instrumented, and identify ways in which this performance may be increased. The collected telemetry data can also be used to diagnose and debug unresponsive events, code execution exceptions, and code execution errors that may occur during the target computer program's execution. The collected telemetry data can also be used to diagnose and debug crashes that may occur during the target computer program's execution. The collected telemetry data can also be used to understand how successful the target computer program is in fulfilling its design goals. The collected telemetry data can also be used to understand how often the target computer program is run online (e.g., in a manner that necessitates the target computing device(s) which is executing the program to be connected to an operational data communication network, and utilizes the network-based features of the program) versus offline (e.g., in a manner that does not necessitate the target computing device(s) which is executing the program to be connected to an operational data communication network, and does not utilize any network-based features of the program).
In the case where the target computer program is an application program and the target computing device is any one of the wide variety of network-enabled end-user computing devices that exist today (examples of which will be described in more detail hereafter), the telemetry data that is collected by the program instrumentation technique implementations described herein can be used to understand how real-world end-users engage with and utilize the application program (e.g., which features and options of the application program do its end-users utilize and how often). The collected telemetry data can also be used to understand the particular end-user computing device configurations that are preferred by the application program's end-users (e.g., which types of end-user computing devices are utilized to run the program, which display screen sizes, resolutions, and orientations are utilized on these devices, which types of user input modalities are utilized to interact with the program, and the like).
Additionally and as will be appreciated from the more-detailed description that follows, the program instrumentation technique implementations described herein provide for a flexible, low cost, and fast turn-around time way to instrument a target computer program for telemetry data collection that minimizes the program performance and program usability impacts to the end-users of the program. More particularly, the program instrumentation technique implementations can instrument a target computer program on-the-fly and deliver instrumented binaries (e.g., instrumented executable images for various computing environments) for the program without having to modify the program's existing source code and binaries and then formally release the modified (e.g., patched) binaries. The program instrumentation technique implementations can also configure the instrumented target computer program to collect many different types of telemetry data from any type of function (e.g., any type of application program interface (API), among other types of functions) that exists within the target computer program. The particular types of telemetry data to be collected are specified by a user in an instrumentation manifest that is described in more detail hereafter. Examples of the different types of telemetry data that can be collected by the program instrumentation technique implementations are also described in more detail hereafter and include, but are not limited to, different types of function usage data and performance data.
The program instrumentation technique implementations described herein, and each instrumented target computer program that is generated thereby, also introduces negligible overhead on the computing resources needed to execute the instrumented target computer program. Additionally, the semantics of each instrumented target computer program generated by the program instrumentation technique implementations are the same as the semantics of the non-instrumented target computer program—in other words, the program instrumentation implementations technique do not change the semantics of the target computer program.
Referring again to
Referring again to
Referring again to
As is appreciated in the arts of software programming and computing, the source code for a given computer program is coded (e.g., written) using a prescribed programming language, and is then compiled into a set of executable files that are designed to be installed into and executed in a prescribed computing environment (e.g., on a prescribed type of computing device that is running a prescribed type of operating system and is configured with a prescribed amount of physical memory)—these executable files are often referred to as object code, or binary files (or binaries for short). A given computer program generally consists of a variety of different modules that interact with each other and collectively form the program. In the case where module A needs to use a function B that is defined in module C, module A will import the function B from module C—function B is herein considered to be an imported function. In the case where module A defines a function D and exposes the function D so that it can be used by other modules, function D is herein considered to be an exported function. In the case where module A defines another function E that is intended to be used just inside module A (in other words, function E is neither an imported function nor an exported function), function E is herein considered to be an internal function.
In one implementation of the program instrumentation technique described herein the target functions specified by the metadata in the instrumentation manifest (hereafter sometimes simply referred to as the specified target functions) include a specific function that is imported into the target computer program. In another implementation of the program instrumentation technique the specified target functions include a specific function that is exported from the target computer program. In another implementation of the program instrumentation technique the specified target functions include the instruction at the beginning of a specific function (e.g., the first instruction of the specific function) that supports hot-patching and is internal to the target computer program (i.e., the specific function is neither imported into nor exported from the target computer program). A specific function that is internal to the target computer program is hereafter sometimes simply referred to as a specific internal function. The term “hot-patching” in the context of a function is described in more detail hereafter. In another implementation of the program instrumentation technique the specified target functions include the instruction at the beginning of a specific internal function that does not support hot-patching.
In another implementation of the program instrumentation technique described herein the specified target functions include a specific instruction in a specific internal function, where this specific instruction is specified by an offset from the instruction at the beginning of the specific internal function. Given the foregoing, it will be appreciated that the just-described offset is part of the metadata that is included in the instrumentation manifest. As will be appreciated from the more-detailed description that follows, the just-described specific instruction can be any instruction in the specific internal function other than the first instruction thereof (e.g., the just-described specific instruction may be an instruction in the middle of the specific internal function, or an instruction toward the end of the specific internal function, among other places in the specific internal function).
In one version of the aforementioned implementation of the program instrumentation technique described herein where the target computer program is an application program that is launched by a user (hereafter sometimes simply referred to as the application program implementation), the specified target functions may include a specific API that is that is imported into the application program. In another version of the application program implementation the specified target functions may include a specific API that is exported from the application program. In another version of the application program implementation the specified target functions may include a specific API that is internal to the application program (i.e., an API that is neither imported into nor exported from the application program). In another version of the application program implementation the specified target functions may include a specific instruction in a specific API that is internal to the application program, where this specific instruction is specified by an offset from the instruction at the beginning of the this internal API. Given the foregoing, it will be appreciated that the just-described offset is part of the metadata that is included in the instrumentation manifest. As will be appreciated from the more-detailed description that follows, the just-described specific instruction can be any instruction in the internal API other than the first instruction thereof (e.g., the just-described specific instruction may be an instruction in the middle of the internal API, or an instruction toward the end of the internal API, among other places in the internal API).
The aforementioned instrumentation manifest can be easily generated by any user. For example, in the case where the target computer program has not yet been released to production, the manifest may be generated by a software engineer who is responsible for the program's source code, or by a test engineer who is responsible for performing quality assurance testing on the program. In the case where the target computer program has already been released to production, the manifest may be generated by a person who is responsible for providing customer support for the program, or by a software engineer who wants to understand how the program is currently being used in order to determine modifications to make or new features to add in a future version of the program. The manifest may be generated on any computing device regardless of whether or not the target computer program is installed on this computing device. For example, the manifest may be generated on any end-user (e.g., client) computing device, or the manifest may be generated in the cloud.
In a tested implementation of the program instrumentation technique described herein the instrumentation manifest is realized as follows. The aforementioned metadata (that specifies the target functions existing within the target computer program from which telemetry data is to be collected, and the types of telemetry data that are to be collected from each of these specified target functions) is packaged (e.g., encapsulated) into a dynamic instrument manifest file (e.g., a .dim file) designed to support the program instrumentation technique. Referring again to
Referring again to
As described heretofore, the program instrumentation technique implementations described herein can collect many different types of telemetry data, where, for each of the specified target functions, the particular types of telemetry data to be collected from the specified target function are specified by the metadata in the instrumentation manifest. In one implementation of the program instrumentation technique described herein the types of telemetry data to be collected from a given specified target function include the value of one or more specific parameters appearing in the specified target function. Referring again to
In another implementation of the program instrumentation technique described herein the types of telemetry data to be collected from a given specified target function include one or more specific attributes of the target computing device (e.g., computing environment data)—this particular implementation is hereafter sometimes simply referred to as the attributes implementation. In one version of the attributes implementation the specific attributes of the target computing device include the type of operating system that is running on the target computing device. In another version of the attributes implementation the specific attributes of the target computing device include the version of this operating system. In another version of the attributes implementation the specific attributes of the target computing device include the amount of physical memory (herein also referred to as system memory) that is installed on the target computing device.
As is appreciated in the art of computing, and as will be described in more detail hereafter, the target computing device includes one or more processing units that are configured to execute each of the programs and related sub-programs that are installed on the target computing device. As such, in another version of the attributes implementation the specific attributes of the target computing device include the type of each of the processing units. In another version of the attributes implementation the specific attributes of the target computing device include the operating speed of each of the processing units. In another version of the attributes implementation the specific attributes of the target computing device include the total number of processing units.
Referring again to
It will be appreciated that the telemetry data collection function described herein can be realized in various ways. For example, in one implementation of the program instrumentation technique described herein the telemetry data collection function associated with each of the target functions specified in the instrumentation manifest is generated dynamically as needed (e.g., whenever the target function is executed) on the target computing device using conventional methods, so that each of the target functions will be redirected to its corresponding telemetry data collection function whenever the target function is called. In another implementation of the program instrumentation technique a common telemetry data collection function having a plurality of entry points is generated using conventional methods, where each of these entry points supports a different one of the target functions specified in the instrumentation manifest, so that each of the target functions will be redirected to a different one of the entry points whenever the target function is called.
While the program instrumentation technique has been described by specific reference to implementations thereof, it is understood that variations and modifications thereof can be made without departing from the true spirit and scope of the program instrumentation technique. It is noted that any or all of the implementations that are described in the present document and any or all of the implementations that are illustrated in the accompanying drawings may be used and thus claimed in any combination desired to form additional hybrid implementations. In addition, although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
What has been described above includes example implementations. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the claimed subject matter, but one of ordinary skill in the art may recognize that many further combinations and permutations are possible. Accordingly, the claimed subject matter is intended to embrace all such alterations, modifications, and variations that fall within the spirit and scope of the appended claims.
In regard to the various functions performed by the above described components, devices, circuits, systems and the like, the terms (including a reference to a “means”) used to describe such components are intended to correspond, unless otherwise indicated, to any component which performs the specified function of the described component (e.g., a functional equivalent), even though not structurally equivalent to the disclosed structure, which performs the function in the herein illustrated exemplary aspects of the claimed subject matter. In this regard, it will also be recognized that the foregoing implementations include a system as well as a computer-readable storage media having computer-executable instructions for performing the acts and/or events of the various methods of the claimed subject matter.
There are multiple ways of realizing the foregoing implementations (such as an appropriate application programming interface (API), tool kit, driver code, operating system, control, standalone or downloadable software object, or the like), which enable applications and services to use the implementations described herein. The claimed subject matter contemplates this use from the standpoint of an API (or other software object), as well as from the standpoint of a software or hardware object that operates according to the implementations set forth herein. Thus, various implementations described herein may have aspects that are wholly in hardware, or partly in hardware and partly in software, or wholly in software.
The aforementioned systems have been described with respect to interaction between several components. It will be appreciated that such systems and components can include those components or specified sub-components, some of the specified components or sub-components, and/or additional components, and according to various permutations and combinations of the foregoing. Sub-components can also be implemented as components communicatively coupled to other components rather than included within parent components (e.g., hierarchical components).
Additionally, it is noted that one or more components may be combined into a single component providing aggregate functionality or divided into several separate sub-components, and any one or more middle layers, such as a management layer, may be provided to communicatively couple to such sub-components in order to provide integrated functionality. Any components described herein may also interact with one or more other components not specifically described herein but generally known by those of skill in the art.
The program instrumentation technique implementations described herein are operational within numerous types of general purpose or special purpose computing system environments or configurations.
To allow a device to realize the program instrumentation technique implementations described herein, the device should have a sufficient computational capability and system memory to enable basic computational operations. In particular, the computational capability of the simplified computing device 10 shown in
In addition, the simplified computing device 10 may also include other components, such as, for example, a communications interface 18. The simplified computing device 10 may also include one or more conventional computer input devices 20 (e.g., touchscreens, touch-sensitive surfaces, pointing devices, keyboards, audio input devices, voice or speech-based input and control devices, video input devices, haptic input devices, devices for receiving wired or wireless data transmissions, and the like) or any combination of such devices.
Similarly, various interactions with the simplified computing device 10 and with any other component or feature of the program instrumentation technique implementations described herein, including input, output, control, feedback, and response to one or more users or other devices or systems associated with the program instrumentation technique implementations, are enabled by a variety of Natural User Interface (NUI) scenarios. The NUI techniques and scenarios enabled by the program instrumentation technique implementations include, but are not limited to, interface technologies that allow one or more users user to interact with the program instrumentation technique implementations in a “natural” manner, free from artificial constraints imposed by input devices such as mice, keyboards, remote controls, and the like.
Such NUI implementations are enabled by the use of various techniques including, but not limited to, using NUI information derived from user speech or vocalizations captured via microphones or other sensors (e.g., speech and/or voice recognition). Such NUI implementations are also enabled by the use of various techniques including, but not limited to, information derived from a user's facial expressions and from the positions, motions, or orientations of a user's hands, fingers, wrists, arms, legs, body, head, eyes, and the like, where such information may be captured using various types of 2D or depth imaging devices such as stereoscopic or time-of-flight camera systems, infrared camera systems, RGB (red, green and blue) camera systems, and the like, or any combination of such devices. Further examples of such NUI implementations include, but are not limited to, NUI information derived from touch and stylus recognition, gesture recognition (both onscreen and adjacent to the screen or display surface), air or contact-based gestures, user touch (on various surfaces, objects or other users), hover-based inputs or actions, and the like. Such NUI implementations may also include, but are not limited, the use of various predictive machine intelligence processes that evaluate current or past user behaviors, inputs, actions, etc., either alone or in combination with other NUI information, to predict information such as user intentions, desires, and/or goals. Regardless of the type or source of the NUI-based information, such information may then be used to initiate, terminate, or otherwise control or interact with one or more inputs, outputs, actions, or functional features of the program instrumentation technique implementations described herein.
However, it should be understood that the aforementioned exemplary NUI scenarios may be further augmented by combining the use of artificial constraints or additional signals with any combination of NUI inputs. Such artificial constraints or additional signals may be imposed or generated by input devices such as mice, keyboards, and remote controls, or by a variety of remote or user worn devices such as accelerometers, electromyography (EMG) sensors for receiving myoelectric signals representative of electrical signals generated by user's muscles, heart-rate monitors, galvanic skin conduction sensors for measuring user perspiration, wearable or remote biosensors for measuring or otherwise sensing user brain activity or electric fields, wearable or remote biosensors for measuring user body temperature changes or differentials, and the like. Any such information derived from these types of artificial constraints or additional signals may be combined with any one or more NUI inputs to initiate, terminate, or otherwise control or interact with one or more inputs, outputs, actions, or functional features of the program instrumentation technique implementations described herein.
The simplified computing device 10 may also include other optional components such as one or more conventional computer output devices 22 (e.g., display device(s) 24, audio output devices, video output devices, devices for transmitting wired or wireless data transmissions, and the like). Note that typical communications interfaces 18, input devices 20, output devices 22, and storage devices 26 for general-purpose computers are well known to those skilled in the art, and will not be described in detail herein.
The simplified computing device 10 shown in
Retention of information such as computer-readable or computer-executable instructions, data structures, programs, sub-programs, and the like, can also be accomplished by using any of a variety of the aforementioned communication media (as opposed to computer storage media) to encode one or more modulated data signals or carrier waves, or other transport mechanisms or communications protocols, and can include any wired or wireless information delivery mechanism. Note that the terms “modulated data signal” or “carrier wave” generally refer to a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. For example, communication media can include wired media such as a wired network or direct-wired connection carrying one or more modulated data signals, and wireless media such as acoustic, radio frequency (RF), infrared, laser, and other wireless media for transmitting and/or receiving one or more modulated data signals or carrier waves.
Furthermore, software, programs, sub-programs, and/or computer program products embodying some or all of the various program instrumentation technique implementations described herein, or portions thereof, may be stored, received, transmitted, or read from any desired combination of computer-readable or machine-readable media or storage devices and communication media in the form of computer-executable instructions or other data structures. Additionally, the claimed subject matter may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof to control a computer to implement the disclosed subject matter. The term “article of manufacture” as used herein is intended to encompass a computer program accessible from any computer-readable device, or media.
The program instrumentation technique implementations described herein may be further described in the general context of computer-executable instructions, such as programs, sub-programs, being executed by a computing device. Generally, sub-programs include routines, programs, objects, components, data structures, and the like, that perform particular tasks or implement particular abstract data types. The program instrumentation technique implementations may also be practiced in distributed computing environments where tasks are performed by one or more remote processing devices, or within a cloud of one or more devices, that are linked through one or more communications networks. In a distributed computing environment, sub-programs may be located in both local and remote computer storage media including media storage devices. Additionally, the aforementioned instructions may be implemented, in part or in whole, as hardware logic circuits, which may or may not include a processor.
Alternatively, or in addition, the functionality described herein can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include FPGAs, application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip systems (SOCs), complex programmable logic devices (CPLDs), and so on.