From 4319d05a36d8e234bdb70110ac3f9a7ca6d58ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Haracewiat?= Date: Fri, 26 Jun 2026 10:30:47 +0200 Subject: [PATCH 1/2] feat(integration): add redaction field for httplog and otlplog --- .../Integration/IntegrationCommandBase.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/legacy/src/Command/Integration/IntegrationCommandBase.php b/legacy/src/Command/Integration/IntegrationCommandBase.php index f29e58785..633e1ce08 100644 --- a/legacy/src/Command/Integration/IntegrationCommandBase.php +++ b/legacy/src/Command/Integration/IntegrationCommandBase.php @@ -620,6 +620,21 @@ private function getFields(): array 'required' => false, 'avoidQuestion' => true, ]), + 'redaction' => new BooleanField('Redaction', [ + 'conditions' => ['type' => [ + 'httplog', + 'newrelic', + 'splunk', + 'sumologic', + 'syslog', + 'otlplog', + ]], + 'description' => 'Whether to enable built-in PII redaction (e.g. email addresses) before forwarding log lines', + 'questionLine' => 'Should built-in PII redaction be enabled', + 'default' => false, + 'required' => false, + 'avoidQuestion' => true, + ]), 'headers' => new ArrayField('HTTP header', [ 'optionName' => 'header', 'conditions' => ['type' => [ From 9e0f60d07e19a2f864fccebedbd6bcc4e93c3da0 Mon Sep 17 00:00:00 2001 From: Patrick Dawkins Date: Wed, 29 Jul 2026 07:04:56 +0100 Subject: [PATCH 2/2] 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) --- .../src/Command/Integration/IntegrationCommandBase.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/legacy/src/Command/Integration/IntegrationCommandBase.php b/legacy/src/Command/Integration/IntegrationCommandBase.php index 6635b7479..d1c553c40 100644 --- a/legacy/src/Command/Integration/IntegrationCommandBase.php +++ b/legacy/src/Command/Integration/IntegrationCommandBase.php @@ -623,14 +623,7 @@ private function getFields(): array 'avoidQuestion' => true, ]), 'redaction' => new BooleanField('Redaction', [ - 'conditions' => ['type' => [ - 'httplog', - 'newrelic', - 'splunk', - 'sumologic', - 'syslog', - 'otlplog', - ]], + 'conditions' => ['type' => $logForwardingTypes], 'description' => 'Whether to enable built-in PII redaction (e.g. email addresses) before forwarding log lines', 'questionLine' => 'Should built-in PII redaction be enabled', 'default' => false,