FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(pii): add data collection options by Litarnus · Pull Request #2156 · getsentry/sentry-php · GitHub

feat(pii): add data collection options - #2156

Draft
Litarnus wants to merge 3 commits into
data-collection-basefrom
data-collection-config
Draft

feat(pii): add data collection options#2156
Litarnus wants to merge 3 commits into
data-collection-basefrom
data-collection-config

Conversation

Litarnus commented Jul 16, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Adds DataCollectionOptions class which works as a container for all data collection specific options. It works similar to the already established Options class, but since options are already big enough I decided to move this into it's own class.

Init happens normally using nested arrays:

\Sentry\init([
    'data_collection' => [
        'http_headers' => [
            'request' => [
                'mode' => 'allowList'
            ]
        ]    
    ]
]);

Also implements ArrayAccess to make accessing nested fields more intuitive and to avoid constructs such as:

$options->getDataCollection()->getHttpHeaders()['request']['terms']

and we can instead use

$options->getDataCollection()['http_headers']['request']['terms']

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL