Main Header

Capture Origin

Updated on July 30, 2026

When Capture origin is enabled under SignalPress → Settings → Settings, SignalPress records where each PHP sp_capture() call was initiated. That metadata appears in Local and delivery logs as an Origin column and is attached to event context for observability integrations.

Use it to find stray captures in custom plugins, themes, or mu-plugins without searching the whole codebase.

See Event Context and Options for how context travels with signals, and Connection Tests and Delivery Log for log columns.

Enable capture origin

  1. Open SignalPress → Settings → Settings.
  2. Check Capture origin — *Record where each signal was initiated in PHP*.
  3. Save settings.

The setting is part of the free plugin. It defaults to off so existing sites are unchanged until you opt in.

What gets recorded

For PHP captures, SignalPress walks the call stack and skips SignalPress internals. The first caller outside SignalPress becomes the origin:

Context fieldMeaning
capture_componentShort label such as plugin:my-plugin, theme:storefront, mu-plugin:bedrock, or wordpress-core
capture_filePath relative to the WordPress root (for example wp-content/plugins/my-plugin/includes/hooks.php)
capture_lineLine number in that file
capture_functionPHP function or method name when available

The Origin log column shows a compact label, for example:

Text

plugin:my-plugin · wp-content/plugins/my-plugin/includes/hooks.php:47

You can filter and sort on Origin in Local logs and delivery logs (Tier 1+ pagination).

JavaScript captures

JavaScript capture runs through WordPress REST. When capture origin is enabled, those rows show browser as the component (for example browser · javascript or browser · javascript:footer when a source option is passed). Browser captures do not include a PHP file and line.

Manual overrides

Pass capture fields in the sp_capture() options array to override automatic detection:

PHP

sp_capture(
	'custom_event',
	[ 'message' => 'Handled manually' ],
	[
		'capture_component' => 'plugin:legacy-bridge',
		'capture_file'      => 'wp-content/mu-plugins/legacy-bridge.php',
		'capture_line'      => 12,
	]
);

Where origin appears

DestinationReceives origin?
Local logsYes — Origin column and stored context when enabled
Delivery logsYes — Origin column and payload preview context
PostHog, Mixpanel, GA4, Sentry, Datadog, webhooks, logs, …Yes — context fields are included in the outbound payload
Slack, Email, Discord, Teams, PushoverNo — stripped before delivery so alerts stay readable

Observability integrations already merge SignalPress context into their event properties or tags. Capture origin fields follow the same path as source, project, and environment.

Notification integrations intentionally omit origin. Message templates and alert text are not designed for file paths and line numbers.

Customize per integration

Use the signalpress/service_includes_capture_origin filter to include or exclude origin for a specific service ID:

PHP

add_filter(
	'signalpress/service_includes_capture_origin',
	function ( bool $include, string $service_id ): bool {
		if ( 'google_sheets' === $service_id ) {
			return false;
		}
		return $include;
	},
	10,
	2
);

Default excluded service IDs: slack, discord, teams, email, pushover.

Performance and privacy

Capture origin uses PHP's debug_backtrace() once per capture when the setting is on. On high-volume sites, leave it disabled in production unless you are actively debugging.

Origin metadata describes code location, not end-user identity. It does not add usernames, emails, or IP addresses beyond what SignalPress already records in the Actor column.