Configuration
DebugHawk is configured at the plugin level using the DEBUGHAWK_CONFIG
constant. Define this constant in your wp-config.php
file to control data capture.
Basic Configuration
The minimum configuration requires three settings:
define( 'DEBUGHAWK_CONFIG', [
'enabled' => true,
'endpoint' => 'https://ingest.debughawk.com/your-endpoint',
'secret' => 'your-secret-key',
] );
Copy your specific endpoint and secret from the DebugHawk dashboard.
Sampling
DebugHawk captures everything by default. For high-traffic sites, you may want to monitor only a percentage of requests to make data analysis more manageable:
define( 'DEBUGHAWK_CONFIG', [
'enabled' => true,
'endpoint' => 'https://ingest.debughawk.com/your-endpoint',
'secret' => 'your-secret-key',
'sample_rate' => 0.1, // Monitor 10% of requests
] );
Use sample_rate
values between 0.1
(10%) and 1
(100%). For staging and local environments, keep the default 100% sampling rate to capture all activity during development and testing.
Advanced Configuration
enabled boolean
Default: true
Enables or disables DebugHawk monitoring entirely.
endpoint string
Required. The ingest endpoint for your DebugHawk team.
secret string
Required. Your team's secret key for encrypted data transmission.
sample_rate float
Default: 1
(100%)
Controls what percentage of requests are monitored.
trace_admin_pages boolean
Default: true
Monitors WordPress admin pages and dashboard activity.
trace_redirects boolean
Default: true
Tracks redirects and their performance impact.
slow_queries_threshold integer
Default: 50
(milliseconds)
Database queries taking longer than this threshold are flagged as slow queries.
slow_queries_limit integer
Default: 3
Maximum number of slow queries to capture per request.