Skip to content

JavaScript SDK Configuration

This page covers all configuration options for the SideSeat JavaScript SDK.

interface SideSeatOptions {
disabled?: boolean;
endpoint?: string;
apiKey?: string;
projectId?: string;
serviceName?: string;
serviceVersion?: string;
framework?: Framework | string;
enableTraces?: boolean;
logLevel?: LogLevel;
debug?: boolean;
}

All properties are optional. The SDK uses sensible defaults and environment variables.

For each option, the SDK checks in order:

  1. Config parameter (highest priority)
  2. Environment variable
  3. Auto-detection
  4. Default value (lowest priority)

Disable all telemetry.

SourceValue
Configconfig.disabled
EnvironmentSIDESEAT_DISABLED
Defaultfalse
init({ disabled: true });

The SideSeat server URL.

SourceValue
Configconfig.endpoint
EnvironmentSIDESEAT_ENDPOINT
Defaulthttp://127.0.0.1:5388
// Via config
init({ endpoint: 'http://custom:5388' });
// Via environment
// SIDESEAT_ENDPOINT=http://custom:5388 node app.js

The project ID for organizing traces.

SourceValue
Configconfig.projectId
EnvironmentSIDESEAT_PROJECT_ID
Default"default"
init({ projectId: 'my-project' });

Optional API key for authenticated endpoints.

SourceValue
Configconfig.apiKey
EnvironmentSIDESEAT_API_KEY
Default(none)
init({ apiKey: 'sk-xxx' });

When set, adds an Authorization: Bearer {apiKey} header to OTLP requests.

The service name for resource attributes.

SourceValue
Configconfig.serviceName
Environmentnpm_package_name then OTEL_SERVICE_NAME
Default"unknown-service"
init({ serviceName: 'my-ai-agent' });

The service version for resource attributes.

SourceValue
Configconfig.serviceVersion
Environmentnpm_package_version
Default"0.0.0"
init({ serviceVersion: '1.2.3' });

Explicitly select a framework for instrumentation.

SourceValue
Configconfig.framework
Default"sideseat"
import { init, Frameworks } from '@sideseat/sdk';
init({ framework: Frameworks.VercelAI });

Available constants: Frameworks.Strands, Frameworks.VercelAI, Frameworks.LangChain, Frameworks.CrewAI, Frameworks.AutoGen, Frameworks.OpenAIAgents, Frameworks.GoogleADK, Frameworks.PydanticAI.

You can also pass any string for custom frameworks.

Enable trace span export.

SourceValue
Configconfig.enableTraces
Defaulttrue
init({ enableTraces: false }); // Disable tracing

Control SDK log verbosity.

SourceValue
Configconfig.logLevel
EnvironmentSIDESEAT_LOG_LEVEL
Default"debug" if debug=true, else "none"

Valid levels: "none", "error", "warn", "info", "debug", "verbose".

init({ logLevel: 'info' });

Enable verbose logging (shortcut for logLevel: "debug").

SourceValue
Configconfig.debug
EnvironmentSIDESEAT_DEBUG
Defaultfalse
init({ debug: true });
VariableDescriptionDefault
SIDESEAT_DISABLEDDisable all telemetryfalse
SIDESEAT_ENDPOINTServer URLhttp://127.0.0.1:5388
SIDESEAT_PROJECT_IDProject IDdefault
SIDESEAT_API_KEYAPI key (optional)(none)
SIDESEAT_DEBUGEnable debug loggingfalse
SIDESEAT_LOG_LEVELLog verbosity(none)
npm_package_nameService name (set by npm)(from package.json)
npm_package_versionService version (set by npm)(from package.json)
OTEL_SERVICE_NAMEService name fallback(none)

The SDK sends these headers with OTLP requests:

HeaderValue
User-Agentsideseat-sdk-node/{version}
AuthorizationBearer {apiKey} (if apiKey set)
Content-Typeapplication/x-protobuf
import { init } from '@sideseat/sdk';
init({
debug: true // See what's happening
});
import { init } from '@sideseat/sdk';
init({
endpoint: process.env.SIDESEAT_ENDPOINT,
projectId: process.env.SIDESEAT_PROJECT_ID,
apiKey: process.env.SIDESEAT_API_KEY,
serviceName: 'my-production-agent'
});
import { init } from '@sideseat/sdk';
const isProduction = process.env.NODE_ENV === 'production';
init({
endpoint: isProduction
? 'http://sideseat.internal:5388'
: 'http://localhost:5388',
projectId: isProduction ? 'production' : 'development',
debug: !isProduction
});