Sprkl Docs
SupportSprkl websiteJoin Sprkl betaJoin Sprkl for CI
latest (0.0.70)
latest (0.0.70)
  • What is Sprkl?
  • Getting started
    • Install Sprkl
    • Instrument your code
      • Bare metal
      • Docker
      • Kubernetes
    • Start with a sample project with Docker Compose
  • Features
    • Instrumentation
      • Frontend tracing - NEW!
      • Selenium tracing - NEW!
      • Static analyzed code risks - NEW!
    • Dashboard
      • Personal vs. Global
      • Code Block Reference
    • Code markups
    • System Graph
    • Jaeger tracing
    • Jest integration
    • Detect runtime security vulnerabilities
  • Integrations and supported stack
  • Concepts
    • Analysis
  • FAQ
  • Support
  • Sprkl for GitHub Actions
    • Overview
    • Setup
    • Pulling Sprkl data to your IDE for further debugging
  • Troubleshooting
Powered by GitBook
On this page
  • 1. Clone our sample repository
  • 2. Make code changes
  • 3. Run sprkl
  • 4. See your code change analysis in the Sprkl dashboard
  1. Getting started

Start with a sample project with Docker Compose

PreviousKubernetesNextFeatures

Last updated 2 years ago

1. Clone our sample repository

Clone our repository and open it in a new VS Code window

git clone https://github.com/sprkl-dev/use-sprkl.git

Install the project with the following:

# You Can also use NPM if not using yarn.
yarn install

2. Make code changes

Let's apply some code changes to the repository code to understand better how sprkl works.

Sprkl is built on the idea of analyzing code changes and integrating instrumentation of the scanned changes into the runtime. Once we apply the following code changes, we will get an insightful view of how these code changes play in our application.

2.1. Make the 1st code change

In the file, metrics/metrics.js uncomment the following code block (starting at line 41).

Note that this code has some inefficiencies that will show up in the Sprkl dashboard

2.2. Make the 2nd code change

Add the following code to file orders/index.js line 35:

3. Run sprkl

Let's deploy the microservices with docker-compose using the following command:

sprkl --recipe=uncommitted -- docker compose up --build -d --force-recreate

Now that the deployment was successful let's run our end-2-end testing:

# If you'll look at the "test:e2e:run" script is running Jest.
sprkl --recipe=uncommitted -- yarn test

4. See your code change analysis in the Sprkl dashboard

Open the Sprkl dashboard by clicking on the Sprkl icon from the main menu.


Check the “insights” section to see the inefficiencies the code contains.

For more information about the recipe flag, read .

Analysis