Skip to content

Feature Request: Allowlist support for connectors and requests #8

Description

@lloricode

What happened?

Hi! Sorry, there's no feature request template so I'm using this one — feel free to close if this isn't the right place.

Currently, Barstool only supports an ignore list (ignored_connectors / ignored_requests) to exclude specific connectors and requests from being recorded. In our case, we have a large number of requests and multiple connectors across the project, but we only need to monitor a small subset of them. Maintaining a long and ever-growing ignore list isn't practical — every time a new connector or request is added, we have to remember to exclude it. It would be great to have an allowlist option (e.g., only_connectors / only_requests) where only the listed connectors/requests are recorded and everything else is automatically excluded. Happy to submit a PR if this is something you'd consider! 🙂

How to reproduce the bug

n/a

Package Version

^1.1.1

PHP Version

^8.5

Laravel Version

^12.61.1

Which operating systems does with happen with?

Linux

Notes

No response

Activity

  1. added
    enhancementNew feature or request
    and removed
    bugSomething isn't working
    on Jul 14, 2026
  2. craigpotter commented on Jul 14, 2026

    @craigpotter
    Collaborator

    Yes certainly something I would consider, just need to think about the implementation of it and how we handle both the allow and exclude lists.

    I will give it some thought and will try and get something up over the next couple days but feel free to take a crack as well

  3. added a commit that references this issue on Jul 17, 2026
    a7a1425
  4. craigpotter commented on Jul 17, 2026

    @craigpotter
    Collaborator

    Hey @lloricode — good news: #15 adds exactly this. New only config block, mirroring the existing ignore structure:

    'only' => [
        'connectors' => [
            StripeConnector::class,
        ],
        'requests' => [],
    ],

    The semantics we settled on: if either only list has entries, a request is recorded only when its connector or request class is listed; the ignore list still applies afterwards and always wins, so you can allow a whole connector and still silence one noisy request on it. Empty lists keep today's record-everything behaviour, so it's fully backward compatible.

    This will land in the next release along with Barstool::context() and PHP 8.5 support. Thanks for the suggestion (and for #10!) — and if this covers part of what you were reaching for with the actions refactor in #12, let me know over there. 🍻

  5. lloricode commented on Jul 18, 2026

    @lloricode
    ContributorAuthor

    thank you @craigpotter 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions