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
15 changes: 13 additions & 2 deletions samples/audiences/ingest_audience_members.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,19 @@ function main(
// Sets validate_only to true to validate but not apply the changes in the request.
->setValidateOnly(true);

// Creates a client for the ingestion service.
$client = new IngestionServiceClient();
// [START create_client]
// Creates a client for the ingestion service. Increases the maximum metadata size to 16MB to
// prevent RESOURCE_EXHAUSTED errors when responses contain large error details.
$client = new IngestionServiceClient([
'transportConfig' => [
'grpc' => [
'stubOpts' => [
'grpc.max_metadata_size' => 16 * 1024 * 1024,
],
],
],
]);
// [END create_client]
try {
// Logs the request.
echo "Request:\n" . json_encode(json_decode($request->serializeToJsonString()), JSON_PRETTY_PRINT) . "\n";
Expand Down
13 changes: 12 additions & 1 deletion samples/events/ingest_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,18 @@ function main(
->setAccountId($linkedAccountId));
}

$client = new IngestionServiceClient();
// Creates a client for the ingestion service. Increases the maximum metadata size to 16MB to
// prevent RESOURCE_EXHAUSTED errors when responses contain large error details.
$client = new IngestionServiceClient([
'transportConfig' => [
'grpc' => [
'stubOpts' => [
'grpc.max_metadata_size' => 16 * 1024 * 1024,
],
],
],
]);

try {
$requestCount = 0;
// Batches requests to send up to the maximum number of events per request.
Expand Down
Loading