Exercises to help you learn advanced instrumentation techniques with OpenTelemetry and Honeycomb. To get the most value from these examples you are expected to have a basic knowledge of distributed tracing.
This workshop is meant to be an instructor led workshop, but that shouldn't prevent anyone from doing the workshop themselves. Follow along with the slides.
Make sure to read the speaker notes to get full context on the slide content.
Within each example folder is a run.sh
and stop.sh
file. These are used to build and run as well as stop any of the
services used in the examples. The run script can also be used to start the service in the background for quick testing.
The syntax for the run script is:
run.sh <service-name> [-b]
Where the optional -b
argument will start the service in the background.
Valid service names will depend on the example and are limited to: go-name
, go-year
, java-name
, java-year
, and node-year
.
The syntax for the stop script is:
stop.sh [service-name]
service-name
is optional and if not specific all services we be stopped.
- You can conveniently use GitHub's codespace to run the workshop on its devcontainter.
- Visit https://github.com/honeycombio/workshop-advanced-instrumentation
- Click
Code
button. - Click
Create codespace ...
button to create the new workspace.
In case there are existing workspace, you can reuse existing one, or click +
button to create a new workspace.
- Set up your local environment with your Honeycomb API Key. You will need a Honeycomb Team in order to get your API key. If you don't have a Honeycomb Team you can sign up for a free one here.
source setup-env.sh YOUR_API_KEY
All required prerequisites are set up for you making allowing you to focus on doing the workshop content right away.
You will need to create 2 environment variables in GitPod with your Honeycomb API Key and Dataset name. You will need a Honeycomb Team in order to get your API key. If you don't have a Honeycomb Team you can sign up for a free one here.
To create the environment variables you go to your GitPod user variables and click the New Variable button.
HONEYCOMB_API_KEY
set this to your Honeycomb API Key with a Scope of /
You can also run the workshop on your local system. You will need to ensure you have the proper prerequisites installed, and do some additional setup to your local environment.
The examples in this repository are created using Java and Go.
For Java, a version 11 or greater JDK is required. The Gradle build tool is used to build all Java examples. You will need it installed on your system to run the Java services.
For Go, version 1.14 or greater is required.
- Clone this repository
git clone https://github.com/honeycombio/workshop-advanced-instrumentation.git workshop
cd workshop
- Set up your local environment with your Honeycomb API Key. You will need a Honeycomb Team in order to
get your API key. If you don't have a Honeycomb Team you can sign up for a free one here.
The
-w
option will write the environment variables to your shell profile.
source setup-env.sh YOUR_API_KEY
Each example is stored in its own numbered folder, and builds from the prior example. Some examples (1, 2, 5) have an additional starting point because something new was added which is outside the scope of this workshop (ie: adding multi-thread logic).