HiQ - A Modern Observability System

oracle-samples oracle-samples Last update: Aug 21, 2022

πŸ¦‰ A Modern Observability System

Documentation StatusCodeCovGithub releaselic

HiQ is a declarative, non-intrusive, dynamic and transparent tracking system for both monolithic application and distributed system. It brings the runtime information tracking and optimization to a new level without compromising with speed and system performance, or hiding any tracking overhead information. HiQ applies for both I/O bound and CPU bound applications.

To explain the four features, declarative means you can declare the things you want to track in a text file, which could be a json, yaml or even csv,and no need to change program code. Non-intrusive means HiQ doesn't requires to modify original python code. Dynamic means HiQ supports tracing metrics featuring at run time, which can be used for adaptive tracing. Transparent means HiQ provides the tracing overhead and doesn't hide it no matter it is huge or tiny.

In addition to latency tracking, HiQ provides memory, disk I/O and Network I/O tracking out of the box. The output can be saved in form of normal line by line log file, or HiQ tree, or span graph.

HiQ's philosophy is to decouple observability logic from business logic. We don't have to enter the black hole to observe it. Do you like the idea? Leave a ⭐ if you enjoy the project and welcome to say Hi to us on Slack πŸ‘‹

Observability of Blackhole, NASA 2019

Installation

pip install hiq-python

Get Started

Let start with a simplest example by running HiQ against a simple monolithic python code πŸ“„ main.py:

# this is the main.py python source codeimport timedef func1():    time.sleep(1.5)    print("func1")    func2()def func2():    time.sleep(2.5)    print("func2")def main():    func1()if __name__ == "__main__":    main()

In this code, there is a simple chain of function calls: main() -> func1 -> func2.

Now we want to trace the functions without modifying its code. Let's run the following:

git clone https://github.com/oracle-samples/hiq.gitcd hiq/examples/quick_startpython main_driver.py

If everything is fine, you should be able to see the output like this:

HiQ Simplest Example

From the screenshot we can see the timestamp and the latency of each function:

mainfunc1func2tracing overhead
latency(second)4.00454.00442.50260.0000163

HiQ just traced the main.py file running without touching one line of its code.

Documentation

HTML: πŸ”— HiQ Online Documents | PDF: Please check πŸ”— HiQ User Guide.


Logging: https://hiq.readthedocs.io/en/latest/4_o_advanced.html#log-monkey-king
Tracing: https://hiq.readthedocs.io/en/latest/5_distributed.html

Metrics:

Streaming:

Jupyter NoteBook

Add Observability to PaddlePaddle (PaddleOCR)

Add Observability to Onnxruntime (AlexNet)

Examples

Please check πŸ”— examples for usage examples.

Contributing

HiQ welcomes contributions from the community. Before submitting a pull request, please review our πŸ”— contribution guide.

Security

Please consult the πŸ”— security guide for our responsible security vulnerability disclosure process.

Change Log

v1.0.3

  • add non-intrusive auto instrumentation for flask: HiQFlaskLatencyOtel (πŸ”— example)
  • upgrade dependencies

v1.0.2

  • add non-intrusive auto instrumentation for Onnxruntime, Paddlepaddle, PaddleOCR

License

Copyright (c) 2022 Oracle and/or its affiliates. Released under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl/.

Presentation and Demos

PRAGMA foreign_keys = off; BEGIN TRANSACTION; COMMIT TRANSACTION; PRAGMA foreign_keys = on;

Subscribe to our newsletter