🗓️ Thu 27/02, 13:30
📍 Room SR 206, Building 30.70, Campus South (KIT)
ℹ️ Abstract
🌐 The SustainKieker Project Homepage
🔬 The Kieker Observability Framework
Kieker observability framework features monitoring and analysis capabilities. OpenTelemetry, in comparison, provides means to monitor the program but analysis. Our new Otkt DSL can define a mapping from an OpenTelemetry Span to a Kieker record. Using Otkt, we show how we can use OpenTelemetry to collect monitoring data from a Python program and send it to a Kieker Analysis endpoint.
-
Python3
-
Java (e.g., OpenJDK 21)
# Fedora 40, 41, 42 sudo dnf install java-21-openjdk-devel # Ubuntu 20.04, 22.04, 24.04, 24.10 sudo apt install openjdk-21-jdk
-
Maven
- Install manually: https://maven.apache.org/install.html
- From distribution repositories:
# Fedora 40, 41, 42 sudo dnf install maven # Ubuntu 20.04, 22.04, 24.04, 24.10 sudo apt install maven
-
# Fedora 40, 41, 42 sudo dnf install plotutils # Ubuntu 20.04, 22.04, 24.04, 24.10 sudo apt install plotutils
-
The graphviz graph visualization tools
# Fedora 40, 41, 42 sudo dnf install graphviz # Ubuntu 20.04, 22.04, 24.04, 24.10 sudo apt install graphviz
Instrumenting a Python software may require downloading the source code and
building a package. In this case, follow the instruction below and repackage it
yourself. It could be as simple as running python3 -m build
. Otherwise, you
need to follow the provided build instruction.
# Instrument the target software before running the below commands
pip install build
python3 -m build
- BUILD.md describes how to build an Otkt program.
- The repository provides all artifacts from an Otkt build.
-
Build the Otkt collector with Maven.
cd collector mvn clean package
-
To instrument a python program, export the parent path of the
otkt
directory to thePYTHONPATH
variable:export PYTHONPATH=/path/to/parent/of/otkt:$PYTHONPATH
i.e.,
export PYTHONPATH=/path/to/hackathon/python:$PYTHONPATH
-
Prepend the following line to all Python files of the target program:
from otkt.otelinit import tracer
-
Prepend the following line before all Python method definitions:
@instrument
- It is important to adhere to the indentation of each method definitions.
-
Make sure you have all required dependencies below. A python project usually comes with
requirements.txt
. Append all dependencies in res/requirements.txt to the target software'srequirements.txt
.- If the software does not provide such file, you may copy the provided requirements.txt file and use it as followed by:
pip install -r requirements.txt
-
Run the Otkt collector on a separate terminal.
java -jar /path/to/Collector-0.0.1-SNAPSHOT-jar-with-dependencies.jar -c /path/to/config.txt
-
On a new terminal, run the target program (e.g.,
python3 main.py
as below). You need the PYTHONPATH environmental variable exported to locate all otkt modules. See that the Otkt collector runs in the background to receive all created monitoring records. The collected monitoring recrods can be found in the output destination you specified in "config.txt" above.export PYTHONPATH=${PWD}:$PYTHONPATH python3 main.py
-
we use the Kieker Trace Analysis to analyze the target program.
-
The Otkt collector stores all received records under
/tmp
. E.g.,/tmp/kieker-20250217-181132-41826294550971-UTC--KIEKER/ /tmp/kieker-20250218-093839-12420615078112-UTC--KIEKER/ /tmp/kieker-20250218-114626-20087904425947-UTC--KIEKER/
You can change the location by changing the value for
kieker.monitoring.writer.filesystem.FileWriter.customStoragePath
in res/config.txt.