Configuration
Complete reference for all SkySignal agent configuration options.
Settings Structure
SkySignal uses Meteor's settings system with two configuration sections:
{
"skysignal": {
// Server-side configuration (private)
},
"public": {
"skysignal": {
// Client-side configuration (RUM, error tracking)
}
}
}
Server-Side Configuration
Configure server-side monitoring in settings.skysignal:
Required
| Option | Type | Description |
|---|---|---|
apiKey | String | Your SkySignal API key (sk_xxx format) |
General Options
| Option | Type | Default | Description |
|---|---|---|---|
enabled | Boolean | true | Enable/disable the agent |
debug | Boolean | false | Enable verbose debug logging |
endpoint | String | https://dash.skysignal.app | API endpoint URL |
host | String | Auto-detected | Override hostname identification |
appVersion | String | Auto-detected | Application version for tracking releases |
Batching & Performance
| Option | Type | Default | Description |
|---|---|---|---|
batchSize | Integer | 50 | Max items before auto-flush |
batchSizeBytes | Integer | 262144 | Max bytes per batch (256KB) |
flushInterval | Integer | 10000 | Flush interval in ms |
maxBatchRetries | Integer | 3 | Max retries for failed batches |
requestTimeout | Integer | 3000 | API request timeout in ms |
maxMemoryMB | Integer | 50 | Max memory for batches |
Sampling
| Option | Type | Default | Description |
|---|---|---|---|
traceSampleRate | Number | 1.0 | Method trace sampling (0.0-1.0) |
rumSampleRate | Number | 0.5 | RUM data sampling (0.0-1.0) |
System Metrics
| Option | Type | Default | Description |
|---|---|---|---|
collectSystemMetrics | Boolean | true | Collect CPU, memory, event loop |
systemMetricsInterval | Integer | 60000 | Collection interval (ms) |
Method Tracing
| Option | Type | Default | Description |
|---|---|---|---|
collectTraces | Boolean | true | Track Meteor Methods |
traceMethodArguments | Boolean | true | Capture method arguments |
maxArgLength | Integer | 1000 | Max string length for arguments |
traceMethodOperations | Boolean | true | Capture detailed operation timeline |
Error Tracking
| Option | Type | Default | Description |
|---|---|---|---|
collectErrors | Boolean | true | Track server-side errors |
MongoDB Monitoring
| Option | Type | Default | Description |
|---|---|---|---|
collectMongoPool | Boolean | true | Track connection pool stats |
mongoPoolInterval | Integer | 60000 | Collection interval (ms) |
mongoPoolFixedConnectionMemory | Number | null | Fixed bytes per connection |
collectCollectionStats | Boolean | true | Track collection statistics |
collectionStatsInterval | Integer | 300000 | Collection interval (5 min) |
Index Usage Tracking
| Option | Type | Default | Description |
|---|---|---|---|
captureIndexUsage | Boolean | true | Capture MongoDB explain() data |
indexUsageSampleRate | Number | 0.05 | Sample rate for explain (5%) |
explainVerbosity | String | executionStats | queryPlanner, executionStats, or allPlansExecution |
explainSlowQueriesOnly | Boolean | false | Only explain slow queries |
DDP Connections
| Option | Type | Default | Description |
|---|---|---|---|
collectDDPConnections | Boolean | true | Track DDP connections |
ddpConnectionsInterval | Integer | 30000 | Collection interval (ms) |
HTTP Requests
| Option | Type | Default | Description |
|---|---|---|---|
collectHttpRequests | Boolean | true | Track HTTP requests |
Background Jobs
| Option | Type | Default | Description |
|---|---|---|---|
collectJobs | Boolean | true | Track background jobs |
jobsInterval | Integer | 30000 | Collection interval (ms) |
jobsPackage | String | Auto-detect | Job package (msavin:sjobs) |
Worker Threads
| Option | Type | Default | Description |
|---|---|---|---|
useWorkerThread | Boolean | false | Offload to worker thread |
workerThreshold | Integer | 50 | Pool size to trigger worker |
Client-Side Configuration (RUM)
Configure Real User Monitoring in settings.public.skysignal:
Required
| Option | Type | Description |
|---|---|---|
publicKey | String | Your SkySignal public key (pk_xxx format) |
RUM Options
Configure under settings.public.skysignal.rum:
| Option | Type | Default | Description |
|---|---|---|---|
enabled | Boolean | true | Enable RUM collection |
trackUserActions | Boolean | true | Track clicks, form submits |
trackPageViews | Boolean | true | Track page navigation |
debug | Boolean | false | Enable debug logging |
Error Tracking Options
Configure under settings.public.skysignal.errorTracking:
| Option | Type | Default | Description |
|---|---|---|---|
enabled | Boolean | true | Enable client error tracking |
attachScreenshots | Boolean | false | Capture screenshots on error |
screenshotQuality | Number | 0.7 | Screenshot JPEG quality |
screenshotSamplingRate | Number | 100 | % of errors to screenshot |
maxScreenshotSize | Integer | 512000 | Max screenshot size (bytes) |
redactSelectors | Array | [] | CSS selectors to redact |
captureUnhandledRejections | Boolean | true | Capture Promise rejections |
captureConsoleErrors | Boolean | false | Capture console.error calls |
ignoreErrors | Array | [] | Error messages to ignore |
debug | Boolean | false | Enable debug logging |
Example Configurations
Minimal Setup
{
"skysignal": {
"apiKey": "sk_live_xxxxxxxxxxxx"
},
"public": {
"skysignal": {
"publicKey": "pk_live_xxxxxxxxxxxx"
}
}
}
Development
{
"skysignal": {
"apiKey": "sk_dev_xxxxxxxxxxxx",
"debug": true,
"traceSampleRate": 1.0
},
"public": {
"skysignal": {
"publicKey": "pk_dev_xxxxxxxxxxxx",
"rum": {
"enabled": true,
"debug": true
},
"errorTracking": {
"enabled": true,
"attachScreenshots": true,
"debug": true
}
}
}
}
Production (Full Featured)
{
"skysignal": {
"apiKey": "sk_live_xxxxxxxxxxxx",
"enabled": true,
"debug": false,
"appVersion": "1.2.3",
"collectSystemMetrics": true,
"systemMetricsInterval": 60000,
"collectTraces": true,
"traceMethodArguments": true,
"traceSampleRate": 1.0,
"collectErrors": true,
"collectMongoPool": true,
"mongoPoolInterval": 60000,
"captureIndexUsage": true,
"indexUsageSampleRate": 0.05,
"collectDDPConnections": true,
"collectHttpRequests": true,
"collectJobs": true
},
"public": {
"skysignal": {
"publicKey": "pk_live_xxxxxxxxxxxx",
"rum": {
"enabled": true,
"trackUserActions": true,
"trackPageViews": true
},
"errorTracking": {
"enabled": true,
"attachScreenshots": false,
"captureUnhandledRejections": true
}
}
}
}
High-Traffic (Reduced Sampling)
{
"skysignal": {
"apiKey": "sk_live_xxxxxxxxxxxx",
"traceSampleRate": 0.1,
"rumSampleRate": 0.1,
"indexUsageSampleRate": 0.01,
"systemMetricsInterval": 120000,
"mongoPoolInterval": 120000,
"batchSize": 100,
"flushInterval": 30000
},
"public": {
"skysignal": {
"publicKey": "pk_live_xxxxxxxxxxxx",
"rum": {
"enabled": true,
"trackUserActions": false
}
}
}
}
Server-Only (No RUM)
{
"skysignal": {
"apiKey": "sk_live_xxxxxxxxxxxx",
"collectSystemMetrics": true,
"collectTraces": true,
"collectErrors": true,
"collectMongoPool": true
}
}
Environment Variables
You can also configure the agent via environment variables:
# API Key (required)
export SKYSIGNAL_API_KEY=sk_live_xxxxxxxxxxxx
# Custom endpoint (optional)
export SKYSIGNAL_ENDPOINT=https://dash.skysignal.app
Environment variables take precedence over settings for supported options.
Programmatic Configuration
For advanced use cases, configure the agent programmatically:
import { SkySignalAgent } from 'meteor/skysignal:agent';
// Configure with custom options
SkySignalAgent.configure({
apiKey: process.env.SKYSIGNAL_API_KEY,
debug: true,
traceSampleRate: 0.5,
collectJobs: false
});
// Start the agent
SkySignalAgent.start();
Override auto-start
If using programmatic configuration, ensure your settings.json doesn't have a skysignal.apiKey to prevent auto-start.
Performance Impact
The agent is designed for minimal overhead:
- CPU: < 1% additional usage
- Memory: < 50MB (configurable via
maxMemoryMB) - Latency: < 2ms per method call
Reducing Impact
For resource-constrained environments:
{
"skysignal": {
"apiKey": "sk_live_xxx",
"traceSampleRate": 0.1,
"systemMetricsInterval": 300000,
"mongoPoolInterval": 300000,
"traceMethodArguments": false,
"captureIndexUsage": false,
"batchSize": 100,
"flushInterval": 60000
}
}
Next Steps
- Method Tracing - Understand method monitoring
- Error Tracking - Configure error capture
- Troubleshooting - Common issues