Skip to content
Search
DSL · Telemetry

attribute_filter

Definition

/**
 * Create an AttributeFilter from a matcher.
 *
 * @param Matcher $matcher the matcher to evaluate against a signal's attributes (compose with all(), any(), not())
 * @param bool $exclude when true (default) a match drops the signal; when false only matching signals are kept
 * @param list<AttributeSource> $sources which attribute sets to inspect (signal, resource and/or scope); the matcher is
 *                                       OR-combined across them, defaulting to the signal's own attributes
 * @param null|string $cacheDir directory for the generated matcher file (defaults to the system temp directory). It is
 *                              `require`d, so it MUST be trusted - not writable by untrusted users. Prefer an
 *                              application-private directory over the shared system temp in multi-tenant environments.
 * @param int $cacheDirPermissions mode applied when the cache directory is created (octal, subject to umask; defaults
 *                                 to 0700 - owner only, since the directory holds `require`d PHP)
 */
attribute_filter(Matcher $matcher, bool $exclude, array $sources, ?string $cacheDir, int $cacheDirPermissions) : AttributeFilter

Contributors

Built in the open.

Join us on GitHub
scroll back to top