Skip to content

Instantly share code, notes, and snippets.

@DaGeRe
Last active November 7, 2024 13:14
Show Gist options
  • Select an option

  • Save DaGeRe/1082b7b6cf5f3dc6535461b7ae09c8df to your computer and use it in GitHub Desktop.

Select an option

Save DaGeRe/1082b7b6cf5f3dc6535461b7ae09c8df to your computer and use it in GitHub Desktop.
Description of a Kieker - ExplorViz Demo using the TeaStore for SSP

Prerequisites

Please make sure you install the following tools:

  • Make sure you got JDK 11 or above installed and $JAVA_HOME set correctly.
  • Make sure you got JMeter installed and $JMETER_HOME pointing to its folder.
  • Make sure you got Kieker (https://github.com/kieker-monitoring/kieker) downloaded (e.g. git clone https://github.com/kieker-monitoring/kieker.git) and built via ./gradlew assemble -x test -x check -x apidoc (we use the current 2.0.0-SNAPSHOT - please file an issue if you have a problem with this steps in a newer version). Set $KIEKER_HOME to the root folder of your built Kieker.
  • My fork of the TeaStore: https://github.com/DaGeRe/TeaStore (git clone --branch kieker-debug https://github.com/DaGeRe/TeaStore.git) In the forks folder:
    • Deactivate the FileWriter: sed -i "s/kieker.monitoring.writer=kieker.monitoring.writer.filesystem.FileWriter/#kieker.monitoring.writer=kieker.monitoring.writer.filesystem.FileWriter/g" utilities/tools.descartes.teastore.dockerbase/kieker.monitoring.properties
    • Activate the SingleSocketTcpWriter: sed -i "s/#kieker.monitoring.writer=kieker.monitoring.writer.tcp.SingleSocketTcpWriter/kieker.monitoring.writer=kieker.monitoring.writer.tcp.SingleSocketTcpWriter/g" utilities/tools.descartes.teastore.dockerbase/kieker.monitoring.properties
  • docker (For Ubuntu: sudo apt install docker.io)
  • Clone ExplorViz deployment: git clone https://github.com/ExplorViz/deployment.git

Architecture Visualization

  • First, start ExplorViz
    • First start: export FRONTEND_PORT=8082 && docker compose pull && docker compose up -d (The FRONTEND_PORT needs to be something that doesn't interfere with the TeaStores port, which is 8080)
    • In case of restarts, make sure to shut it down via docker compose down -v
  • Get your IP (in the following lines: $IP)
  • To set the ExplorViz token, please append the following lines to ../../resources/kieker.monitoring.properties:
kieker.tools.oteltransformer.stages.OpenTelemetryExporterStage.ExplorVizTokenValue=mytokenvalue
kieker.tools.oteltransformer.stages.OpenTelemetryExporterStage.ExplorVizTokenSecret=mytokensecret
  • Start the Kieker Otel transformer:
    • cd $KIEKER_HOME/tools/otel-transformer/build/distributions && unzip otel-transformer-2.0.0-SNAPSHOT.zip
    • otel-transformer-2.0.0-SNAPSHOT/bin/otel-transformer -lp 10001 --configuration ../../resources/kieker.monitoring.properties
  • Start the TeaStore
    • Configure the host for sending monitoring records: sed -i "s/kieker.monitoring.writer.tcp.SingleSocketTcpWriter.hostname=localhost/kieker.monitoring.writer.tcp.SingleSocketTcpWriter.hostname=$IP/" utilities/tools.descartes.teastore.dockerbase/kieker.monitoring.properties (in the TeaStore folder)
    • Start it: ./startContainers.sh $IP
  • Now, finally execute the load test
    • Configure the load test do not delete the TeaStore containers: sed -i "s/docker ps/echo 'Done' \&\& exit 1\n/" startJmeter.sh
    • Start it using ./startJmeter.sh (as often as you'd like)
    • Currently, you'll need to stop the otel-transformer to see results; this will be fixed soon.

Troubleshooting

If your landscape is empty, but ExplorViz shows that there have been requests: grafik This requires reloading the page.

@malte-hansen
Copy link

./gradlew assemble -x test -x check -x apidoc currently fails for https://github.com/DaGeRe/kieker/tree/opentelemetry-stage
It has issues finding JCommander:
kieker/tools/otel-transformer/src/moobench/tools/receiver/RecordReceiverMain.java:6: error: package com.beust.jcommander does not exist import com.beust.jcommander.JCommander;

@DaGeRe
Copy link
Author

DaGeRe commented Aug 9, 2024

Thanks for the hints! I've fixed the ExplorViz clone command.

The otel-transformer is part of the branch KIEKER-1951-Kieker-To-OpenTelemetryStage, which is in the main repo and cleaned (and intended to be merged at some point). I've changed the clone command to clone this branch. The opentelemetry-stage branch in my repo was more wip, and won't be merged (Zipkin was added there as jar file, which is not feasible for long term testing). However, there is still the adapted version of the log replayer in the opentelemetry-stage branch, which we might need at some time (might be worth to have another main class that is able to replay historic data into Zipkin). So I'll leave it there for now.

And the docker compose pull might get necessary at some point, so instead having hard to trace errors, I'd prefer to leave it as it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment