Skip to content

support opentelemetry python#42

Merged
DaGeRe merged 4 commits intokieker-monitoring:mainfrom
FeritBaturAltinn:clean-submission
Mar 17, 2026
Merged

support opentelemetry python#42
DaGeRe merged 4 commits intokieker-monitoring:mainfrom
FeritBaturAltinn:clean-submission

Conversation

@FeritBaturAltinn
Copy link
Contributor

with this pull request opentelemetry python instrumentation measurement becomes possible

Copy link
Collaborator

@DaGeRe DaGeRe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please address the mentioned issues?

executeAllLoops

deactivate
rm "$CONFIG_FILE" 2>/dev/null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put this in .gitignore, do not delete the config file (except there is a specific reason)

export RESULTS_DIR="$BASE_DIR/results-OpenTelemetry-python"
export RAWFN="$RESULTS_DIR/raw"

KIEKER_REPO_URL="https://github.com/kieker-monitoring/kieker-lang-pack-python.git"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary for Otel Python

KIEKER_REPO_URL="https://github.com/kieker-monitoring/kieker-lang-pack-python.git"
KIEKER_DIR="$BASE_DIR/kieker-lang-pack-python"

export PYTHON_SCRIPT="$MAIN_DIR/tools/pybenchmark/benchmark.py"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you name this MOOBENCH_BIN_PY (like in config.rc of Kieker-python)?


export VENV_DIR="$BASE_DIR/venv"
export REQUIREMENTS_FILE="$BASE_DIR/requirements.txt"
export CONFIG_TEMPLATE="$BASE_DIR/config.ini.template"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please try whether this can be removed as well.

KIEKER_DIR="$BASE_DIR/kieker-lang-pack-python"

export PYTHON_SCRIPT="$MAIN_DIR/tools/pybenchmark/benchmark.py"
export ZIPKIN_BIN="$BASE_DIR/zipkin.jar"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can probably just be removed if you use startZipkin and stopBackgroundProcess.

@@ -0,0 +1,90 @@
MOOBENCH_CONFIGURATIONS="0 1 2"
TITLE[0]="No Instrumentation"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move these into label.sh?

.gitignore Outdated
frameworks/pinpoint-java/pinpoint/pinpoint.tar.gz
frameworks/pinpoint-java/scripts/*.json
zipkin.jar
zipkin.jar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't duplicate

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still present

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the duplicate.

@@ -0,0 +1,85 @@
export RECURSION_DEPTH="${RECURSION_DEPTH:-10}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't duplicate this - it should be defined from benchmark.sh already

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the duplicate.

@DaGeRe
Copy link
Collaborator

DaGeRe commented Feb 27, 2026

Thanks for the update, I've made two comments. Could you check them, remove the two duplicates, and respond to the existing comment? (If its not possible to address the comment, just reply there and describe why).

@shinhyungyang
Copy link
Collaborator

@FeritBaturAltinn

Hi, thanks for the efforts! adding a new framework entry is not easy, because MooBench is an established framework that runs several tracing agents. Also, Kieker-python is still under developement. So I'm encouraged to see the work.

From a quick glance, I want to make some points.

  1. Regarding tools/pybenchmark/benchmark.py, I agree with your changes.
  2. Do you run it on Windows, or specifically under Windows/Cygwin environment? Maybe you can say e.g., Windows/Cygwin instead of just stating Windows.
  3. For other tracing agents, we don't use export, whereas most of your variables use export. Is it necessary, and is it related to your Windows/Cygwin environment, perhaps?
  4. We should be relying on the MooBench infrastructure as much as possible. For example, many of your variables in benchmark.sh is already defined in ${MAIN_DIR}/init.sh. I suggest to include this code in your benchmark.sh:
if [ -f "${MAIN_DIR}/init.sh" ] ; then
	source "${MAIN_DIR}/init.sh"
else
	echo "Missing library: ${MAIN_DIR}/init.sh"
	exit 1
fi

Then, you don't need:

# config.rc
export RESULTS_DIR="$BASE_DIR/results-OpenTelemetry-python"
export RAWFN="$RESULTS_DIR/raw"
# benchmark.sh
export NUM_OF_LOOPS=${NUM_OF_LOOPS:-10}
export TOTAL_NUM_OF_CALLS=${TOTAL_NUM_OF_CALLS:-2000000}
export RECURSION_DEPTH=${RECURSION_DEPTH:-10}
export METHOD_TIME=${METHOD_TIME:-0}
export SLEEP_TIME=${SLEEP_TIME:-15}

@FeritBaturAltinn
Copy link
Contributor Author

@shinhyungyang

Hello, thank you for the suggestions. I have refactored benchmark.sh to source init.sh as requested. I also removed export statements from config.rc and functions.sh and added the Windows/Cygwin path detection logic. Finally, I verified the benchmark still runs successfully with accurate measurements after the changes.

@DaGeRe
Copy link
Collaborator

DaGeRe commented Mar 17, 2026

Thanks for the PR. There are some small things to improve (especially formatting with shfmt), but since it's functional, I'll merge for now.

@DaGeRe DaGeRe merged commit 41b0a89 into kieker-monitoring:main Mar 17, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants