diff --git a/src/LaunchDarkly/Impl/Util.php b/src/LaunchDarkly/Impl/Util.php index f90f9876..aa4efc72 100644 --- a/src/LaunchDarkly/Impl/Util.php +++ b/src/LaunchDarkly/Impl/Util.php @@ -126,6 +126,9 @@ public static function eventHeaders(string $sdkKey, $applicationInfo): array { $headers = Util::defaultHeaders($sdkKey, $applicationInfo); $headers['X-LaunchDarkly-Event-Schema'] = EventPublisher::CURRENT_SCHEMA_VERSION; + // Only the presence of this header is important. We encode a string + // value of 'true' to ensure it isn't dropped along the way. + $headers['X-LaunchDarkly-Unsummarized'] = 'true'; return $headers; } diff --git a/src/LaunchDarkly/Subsystems/EventPublisher.php b/src/LaunchDarkly/Subsystems/EventPublisher.php index c2ff9fc7..6062a9bf 100644 --- a/src/LaunchDarkly/Subsystems/EventPublisher.php +++ b/src/LaunchDarkly/Subsystems/EventPublisher.php @@ -18,7 +18,7 @@ interface EventPublisher * @var int * @ignore */ - const CURRENT_SCHEMA_VERSION = 2; + const CURRENT_SCHEMA_VERSION = 4; /** * @param string $sdkKey The SDK key for your account diff --git a/tests/Impl/Integrations/EventPublisherTest.php b/tests/Impl/Integrations/EventPublisherTest.php index 090a2d1c..3d68f21c 100644 --- a/tests/Impl/Integrations/EventPublisherTest.php +++ b/tests/Impl/Integrations/EventPublisherTest.php @@ -88,6 +88,7 @@ public function testSendsCorrectBodyAndHeaders($publisher) $this->assertEquals('sdk-key', $headers['Authorization']); $this->assertEquals('PHPClient/' . LDClient::VERSION, $headers['User-Agent']); $this->assertEquals(EventPublisher::CURRENT_SCHEMA_VERSION, $headers['X-LaunchDarkly-Event-Schema']); + $this->assertArrayHasKey('X-LaunchDarkly-Unsummarized', $headers); $this->assertEquals('application-id/my-id application-version/my-version', $headers['X-LaunchDarkly-Tags']); } }