feat(legacy): add --excluded-services option for log forwarding integrations - #20
Conversation
3215205 to
c1e1401
Compare
There was a problem hiding this comment.
Pull request overview
Adds support in the legacy integration commands for excluding specific services from log forwarding integrations via a new --excluded-services option.
Changes:
- Introduces an
excluded_servicesArrayFieldin the integration form, conditionally available for log-forwarding integration types. - Adds PHPUnit coverage to assert the field exists, is correctly typed, and is restricted to the expected integration types.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| legacy/src/Command/Integration/IntegrationCommandBase.php | Adds the new excluded_services field and CLI option wiring via the shared form fields. |
| legacy/tests/Command/Integration/IntegrationCommandBaseTest.php | Adds tests validating the new field’s presence and conditional behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…rations Allow users to exclude specific apps/services from log forwarding when adding or updating httplog, newrelic, splunk, sumologic, syslog, and otlplog integrations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Spreading $logForwardingTypes into $allSupportedTypes moved 'script' ahead of 'httplog', which renumbers the interactive type chooser and changes the generated command reference. Restore the literal list and use $logForwardingTypes only for the field conditions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
pjcdawkins
left a comment
There was a problem hiding this comment.
Reviewed and merging. Sorry this sat for so long.
Checked the property name, the array-of-strings type and the six-type list against the API spec, and confirmed that an absent flag yields null — so integration:update can't wipe an existing list and integration:add payloads are unchanged for existing users.
I pushed one commit rather than asking you to round-trip: spreading $logForwardingTypes into $allSupportedTypes moved script ahead of httplog, which renumbers the interactive type chooser and changes the generated command reference. $allSupportedTypes is back to its original literal and $logForwardingTypes is now used only for the field conditions. Also merged main in to refresh CI, since the original green run was from March.
Two follow-ups I'll pick up separately, neither blocking:
excluded_servicessetsoptionNameanddefault => [], both of whichArrayFieldalready derives; the siblingexcluded_environmentsomits them.- Docs: the
forward-logs.mdproperty table and the generated CLI reference both need updating. PR #117 adds--redactionto the same commands, so I'll do one docs pass after both land.
On the tests: testExcludedServicesFieldIncludedForLogForwardingTypes derives its expectation from the field under test, so it can't fail — worth replacing with getFinalValue(['a,b']) === ['a','b'] and a ConditionalFieldException case for a non-log-forwarding type if you touch this again.
PR upsun#20 extracted the six log-forwarding integration types into a variable. Use it here instead of a fourth copy of the list, so adding or removing a type updates every conditional field at once. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat(integration): add redaction field for httplog and otlplog * refactor(legacy): reuse $logForwardingTypes for the redaction condition PR #20 extracted the six log-forwarding integration types into a variable. Use it here instead of a fourth copy of the list, so adding or removing a type updates every conditional field at once. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Patrick Dawkins <patrick@upsun.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Allow users to exclude specific apps/services from log forwarding when adding or updating httplog, newrelic, splunk, sumologic, syslog, and otlplog integrations.