Sidekick
Search…
Installation
Follow the below steps to install Sidekick SDK to your application.

Download the Agent

Download the latest Sidekick agent from this link repo.

Configure the Agent

In order to configure the agent, you'll need an API key from Sidekick. You can see your API key in the Welcome Tab.

Configure by Environment Variable

The Sidekick agent can be configured externally through environment variables:
  • Configure the Sidekick API key by setting the SIDEKICK_APIKEY environment variable. This configuration is mandatory.
  • Configure application name by setting the SIDEKICK_AGENT_APPLICATION_NAME environment variable. This configuration is mandatory.
  • Configure the application stage (local, dev, lab, staging, prod, etc.) by setting theSIDEKICK_AGENT_APPLICATION_STAGE environment variable. This configuration is optional.
  • Configure application version (1.0.0, 1.0.1-SNAPSHOT, etc.) by setting theSIDEKICK_AGENT_APPLICATION_VERSION environment variable. This configuration is optional.
You can also enable distributed tracing by integrating Thundra APM agent as explained here. Note that, to be able to use Thundra APM agent, you need to have a separate Thundra APM account which you can get it here.
When you enable distributed tracing with Thundra APM agent, tracepoint snapshot events will be correlated to active traces at the time of tracepoint snapshot has been taken. So you will be able to go to the related traces from the tracepoint snapshot event to understand what did happen in the system during the execution of overall flow/transaction.
So, a sample configuration will look like this:
1
export SIDEKICK_APIKEY=<YOUR-SIDEKICK-API-KEY>
2
export SIDEKICK_AGENT_APPLICATION_NAME=user-service
3
export SIDEKICK_AGENT_APPLICATION_STAGE=dev
4
export SIDEKICK_AGENT_APPLICATION_VERSION=1.0.1-SNAPSHOT
Copied!

Configure by YAML format

Sidekick agent can be configured through a YAML formatted configuration file named sidekick-config.yml in the classpath (for example the config file might be located under src/main/resources directory):
  • Configure the Sidekick API key by setting the sidekick.apiKey YAML key. This configuration is mandatory.
  • Configure the application name by setting thesidekick.agent.application.name YAML key. This configuration is mandatory.
  • Configure the application stage (local, dev, lab, staging, prod, etc.) by setting thesidekick.agent.application.stage YAML key. This configuration is optional.
  • Configure the application version (1.0.0, 1.0.1-SNAPSHOT, etc.) by setting the sidekick.agent.application.version YAML key. This configuration is optional.
So, a sample configuration file sidekick-config.yml will look like this:
1
sidekick:
2
apiKey: <YOUR-SIDEKICK-API-KEY>
3
agent:
4
application:
5
name: user-service
6
stage: dev
7
version: 1.0.1-SNAPSHOT
8
Copied!

Sample Docker Configuration

Here you can see a sample Docker configuration. It may differ from your own Docker configuration. You need to modify this sample according to your own Docker configuration.
1
FROM openjdk:8
2
RUN mkdir -p /app
3
4
# Copy app artifact
5
ADD target/<Your-App>.jar /app/<Your-App>.jar
6
7
# Copy Sidekick bootstrap agent artifact.
8
# Please rename with the file you have downloaded at the first step.
9
ADD sidekick-agent-bootstrap.jar /app/sidekick-agent-bootstrap.jar
10
11
WORKDIR /app
12
EXPOSE 8080
13
ENTRYPOINT [ "java", "-javaagent:sidekick-agent-bootstrap.jar", "-jar", "<Your-App>.jar" ]
Copied!
You can use the example below if you would like to use environment variables with docker run
1
docker run ... \
2
-e SIDEKICK_APIKEY=<YOUR-SIDEKICK-API-KEY> \
3
-e SIDEKICK_AGENT_APPLICATION_NAME=<YOUR-APP-NAME> \
4
-e SIDEKICK_AGENT_APPLICATION_STAGE=dev \
5
-e SIDEKICK_AGENT_APPLICATION_VERSION=1.0.1-SNAPSHOT \
6
...
Copied!

Add Sidekick to Your Application

Run the following command to add Sidekick to your application.
1
java -javaagent:<path-to-sidekick-agent> -jar <your-app-jar> ...
Copied!
Last modified 4mo ago