SDK for Sqreen signals API

Usage no npm install needed!

<script type="module">
  import sqreenSdk from 'https://cdn.skypack.dev/sqreen-sdk';


Standalone SDK for Sqreen API



The module is available as sqreen-sdk:

$ npm i -S sqreen-sdk


Before sending any signal to Sqreen ingestion API, the init method must be called first to setup the authentication token and initialize the batch.

const SqreenSDK = require('sqreen-sdk');
// SqreenSDK.init(token, max batch size, max batch age in seconds)
SqreenSDK.init('<my application token>', 100, 60);

The batch is part of the reporting system of the SDK. It means that the signals placed into it, will be reported together when one of the following condition is reached:

  • the batch size reached it's max value
  • the batch is not empty and has not been reported in the interval set as its max age.

Creating Points

Creating Metrics

Creating Traces

HTTP Traces

Usage with Express