Adjusting logging levels in a hybrid application
AssigneeInternational Business Machines Corporation
InventorsWilliam Duncan Hadden, Francis McNamee
Life of this patent
Estimating the term…
Abstract
The present disclosure discloses dynamically adjusting logging levels in a hybrid application based on system metrics to enhance diagnostic capabilities and performance. By monitoring metrics in, mapping the metrics to logs using predefined labels, and detecting when the metrics exceed predefined thresholds, logging levels of the logs can be increased dynamically, capturing detailed diagnostic information. Responsive to the metrics returning to a normal range, the verbosity of the logs is reduced.
Claims20
A method for adjusting logging levels comprising:
- generating, one or more system metrics associated with a plurality of distributed services in an application;
- mapping each system metric of the one or more system metrics to one or more logs based on a predefined label;
- detecting that a system metric of the one or more system metrics has exceeded a predefined threshold;
- increasing, in a first mode of operation, a logging level of the one or more logs associated with the detected system metric;
- and
- decreasing, in a second mode of operation, the logging level of the one or more logs associated with the detected system metric responsive to the detected system metric no longer exceeding the predefined threshold,
- wherein the one or more logs of the first mode of operation comprise more detail than the one or more logs of the second mode of operation.
A computing device comprising:
- a processor;
- and
- a memory, in communication with the processor, with one or more computer program instructions stored on the memory, the computer program instructions, when executed by the processor, cause the computing device to perform operations comprising:
- generating, one or more system metrics associated with a plurality of distributed services in an application;
- mapping each system metric of the one or more system metrics to one or more logs based on a predefined label;
- detecting that a system metric of the one or more system metrics has exceeded a predefined threshold;
- increasing, in a first mode of operation, a logging level of the one or more logs associated with the detected system metric;
- and
- decreasing, in a second mode of operation, the logging level of the one or more logs associated with the detected system metric responsive to the detected system metric no longer exceeding the predefined threshold,
- wherein the one or more logs of the first mode of operation comprise more detail than the one or more logs of the second mode of operation.
A computer program product for adjusting logging levels in a hybrid application, the computer program product comprising:
- one or more computer-readable storage devices and program instructions stored on the at least one of the one or more computer-readable storage devices, the program instructions executable by a processor, the program instructions comprising:
- program instructions to generate, one or more system metrics associated with a plurality of distributed services in an application;
- program instructions to map each system metric of the one or more system metrics to one or more logs based on a predefined label;
- program instructions to detect that a system metric of the one or more system metrics has exceeded a predefined threshold;
- program instructions to increase, in a first mode of operation, a logging level of the one or more logs associated with the detected system metric;
- and
- program instructions to decrease, in a second mode of operation, the logging level of the one or more logs associated with the detected system metric responsive to the detected system metric no longer exceeding the predefined threshold,
- wherein the one or more logs of the first mode of operation comprise more detail than the one or more logs of the second mode of operation.
Dependencies are inferred from the claim text.