Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/LaunchDarkly/Impl/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/LaunchDarkly/Subsystems/EventPublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/Impl/Integrations/EventPublisherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
}