Sprkl Docs
SupportSprkl websiteJoin Sprkl betaJoin Sprkl for CI
0.0.62
0.0.62
  • What is Sprkl?
  • Getting started
    • Install Sprkl
    • Instrument your code
      • Bare metal
      • Docker
      • Kubernetes
    • Start with a sample project with Docker Compose
  • Features
    • Dashboard
      • Personal vs. Global
      • Code Block Reference
    • Code markups
    • System Graph
    • Jaeger tracing
    • Jest integration
    • New! Detect runtime security vulnerabilities in your code
  • Integrations and supported stack
  • Concepts
    • Analysis
    • Instrumentation
    • Aggregations, metrics and insights
  • FAQ
  • Support
  • Sprkl for GitHub Actions
    • Overview
    • Setup
    • Pulling Sprkl data to your IDE for further debugging
Powered by GitBook
On this page
  • Vanilla node
  • NPM / Yarn
  • Instrumenting Jest executions
  1. Getting started
  2. Instrument your code

Bare metal

PreviousInstrument your codeNextDocker

Last updated 2 years ago

Before you begin, you need to make a code change!

Vanilla node

# Vanilla node
sprkl -- node index.js

In case you run your code directly on your machine - i.e., no docker, ssh, VM, etc. You can instrument your code changes by prefixing your commands with "sprkl --" (that is, "sprkl dash dash").

NPM / Yarn

If you are running your code using package manager (npm / yarn / pnpm):

# NPM
sprkl -- npm run <script-name>
sprkl -- npm test
sprkl -- npm start

# Yarn
sprkl -- yarn <script-name>
sprkl -- yarn test

# PNPM
sprkl -- pnpm <script-name>
sprkl -- pnpm test

Instrumenting Jest executions

In case you have Jest tests (unit tests or end-to-end), you can instrument them using sprkl like so:

# Jest test suite
sprkl -- jest
    
# Jest single test
sprkl -- jest my.test.js 
    
# Jest from from NPM script
sprkl -- npm run <jest-test-script-name>
    
# Jest from Yarn script
sprkl -- yarn <jest-test-script-name>
Here's why.