SeeStack

Configuration

All available SDK initialization options.

The SDK is configured through a single init call at application startup. This page documents every available option.

Full Example

seestack.config.js
import SeeStack from '@seestack/sdk';

SeeStack.init({
  apiKey: 'seestack_live_your_key_here',
  host: 'https://your-seestack-instance.com',
  environment: 'production',
  release: 'v2.3.1',
  flushIntervalMs: 5000,
  bufferSize: 500,
  debug: false,
});
seestack_config.py
import seestack

seestack.init(
    api_key="seestack_live_your_key_here",
    host="https://your-seestack-instance.com",
    environment="production",
    release="v2.3.1",
    flush_interval_ms=5000,
    buffer_size=500,
    debug=False,
)
config.go
seestack.Init(seestack.Config{
    APIKey:          "seestack_live_your_key_here",
    Host:            "https://your-seestack-instance.com",
    Environment:     "production",
    Release:         "v2.3.1",
    FlushIntervalMs: 5000,
    BufferSize:      500,
    Debug:           false,
})

Options Reference

Prop

Type

apiKey and host are required. The SDK will not initialize without them and all methods will be no-ops.

Environment-Specific Configuration

A common pattern is to vary configuration by environment:

init.js
SeeStack.init({
  apiKey: process.env.SEESTACK_API_KEY,
  host: process.env.SEESTACK_HOST,
  environment: process.env.NODE_ENV,
  release: process.env.APP_VERSION,
  debug: process.env.NODE_ENV !== 'production',
});
init.py
import os
import seestack

seestack.init(
    api_key=os.environ["SEESTACK_API_KEY"],
    host=os.environ["SEESTACK_HOST"],
    environment=os.environ.get("APP_ENV", "development"),
    release=os.environ.get("APP_VERSION"),
    debug=os.environ.get("APP_ENV") != "production",
)
init.go
seestack.Init(seestack.Config{
    APIKey:      os.Getenv("SEESTACK_API_KEY"),
    Host:        os.Getenv("SEESTACK_HOST"),
    Environment: os.Getenv("APP_ENV"),
    Release:     os.Getenv("APP_VERSION"),
    Debug:       os.Getenv("APP_ENV") != "production",
})

All SDK requests must use HTTPS. The SDK will refuse to send data over plain HTTP in production environments.

Initialization Behavior

  • Calling init() more than once is idempotent — subsequent calls emit a warning and are ignored.
  • If init() has not been called, all SDK methods (captureError, captureLog, etc.) are silent no-ops.
  • The SDK validates that apiKey is non-empty at init time and fails fast if missing.

On this page