Skip to content

WordPress Configuration

All Nadi settings are configured from the WordPress admin interface at SettingsNadi.

The settings page has 4 tabs: Credentials, Shipper, Sampling, and Status.

Credentials Tab

Enter your API credentials to connect the plugin to your Nadi account.

Credentials Tab

FieldDescription
API KeyYour Sanctum personal access token for authentication. Get your API key
Application KeyYour application identifier token from the Nadi dashboard

Shipper Tab

Configure the Shipper binary that sends your exception logs to the Nadi API.

Shipper Tab

Settings are organized into 6 sections:

Connection

FieldDefaultDescription
Endpointhttps://nadi.pro/api/Nadi API endpoint URL
Accept Headerapplication/vnd.nadi.v1+jsonHTTP Accept header for API requests

Storage

FieldDefaultDescription
Storage PathPlugin's log/ directoryDirectory where JSON log files are written
Tracker Filetracker.jsonFile used to track which logs have been sent
File Pattern*.jsonGlob pattern for log files to process
Dead Letter Dir(empty)Directory for logs that failed to deliver

Performance

FieldDefaultDescription
Workers4Number of concurrent workers for sending logs
CompressOffEnable gzip compression for API requests
PersistentOffKeep HTTP connections alive between requests

Retry

FieldDefaultDescription
Max Tries3Maximum retry attempts per log batch
Timeout1mRequest timeout (e.g., 30s, 1m, 5m)
Check Interval5sInterval between checking for new logs

Security (Beta)

FieldDefaultDescription
TLS CA Cert(empty)Path to custom TLS CA certificate
TLS Skip VerifyOffSkip TLS certificate verification

WARNING

Do not enable TLS Skip Verify in production. This is for development/testing only.

Monitoring (Beta)

FieldDefaultDescription
Health Check Address(empty)Address for health check endpoint
Metrics EnabledOffEnable Prometheus metrics export

Sampling Tab

Control the volume of captured events using sampling strategies.

Sampling Tab

FieldDefaultDescription
Sampling StrategyFixed RateStrategy for deciding which events to capture
Sampling Rate0.1 (10%)Percentage of events to capture (0.0 to 1.0)
Base Rate0.05 (5%)Base rate for dynamic strategies
Load Factor1.0Adjust rate based on system load
Interval Seconds60Time interval for interval-based sampling

Available Strategies

StrategyDescription
Fixed RateCaptures a fixed percentage of events. Set Sampling Rate to 1.0 to capture all events.
Dynamic RateAutomatically adjusts capture rate based on system load. Uses Base Rate and Load Factor.
IntervalCaptures one event per time interval. Configure with Interval Seconds.
Peak LoadAdjusts during high traffic periods.

Development

Set Sampling Rate to 1.0 during development to capture all events. For production, 0.1 (10%) is a good default.

Status Tab

Check plugin health and test your connection.

Status Tab

The status checklist shows:

  • Shipper binary installed — whether the Go binary is present in bin/
  • API Key configured — whether an API key has been set
  • Application Key configured — whether an application key has been set

Test Connection

Click Test Connection to send a test exception to verify your setup. The test exception will be written to the log directory and sent to Nadi on the next cron run (within 1 minute).

Install Shipper

If the Shipper binary is missing, an Install Shipper button will appear. Click it to download and install the binary automatically.

Configuration File

The Shipper settings are stored in config/nadi.yaml within the plugin directory. When you save settings from the Shipper tab, this file is updated automatically.

yaml
nadi:
  apiKey: "your-api-key"
  appKey: "your-application-key"
  endpoint: "https://nadi.pro/api/"
  accept: "application/vnd.nadi.v1+json"
  storage: "/path/to/wp-content/plugins/nadi-wordpress/log"
  trackerFile: "tracker.json"
  filePattern: "*.json"
  deadLetterDir: ""
  workers: 4
  compress: false
  persistent: false
  maxTries: 3
  timeout: "1m"
  checkInterval: "5s"
  tlsCACert: ""
  tlsSkipVerify: false
  healthCheckAddr: ""
  metricsEnabled: false

Next Steps

Released under the MIT License.