Skip to content

docs(samples): exclude request loop from create_client snippet - #55

Merged
jradcliff merged 1 commit into
mainfrom
headers
Oct 20, 2026
Merged

jradcliff merged 1 commit into
mainfrom
headers

Conversation

@jradcliff

Copy link
Copy Markdown
Member

Wraps the ingestion loop in IngestAudienceMembers with START_EXCLUDE tags so the extracted documentation snippet renders a balanced try-with-resources block.

Wraps the ingestion loop in IngestAudienceMembers with START_EXCLUDE
tags so the extracted documentation snippet renders a balanced
try-with-resources block.
@jradcliff

Copy link
Copy Markdown
Member Author

With this change, the create_client region tag will render in documentation with ... in the excluded region, like this:

// 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.
InstantiatingGrpcChannelProvider provider =
    IngestionServiceSettings.defaultGrpcTransportProviderBuilder()
        .setMaxInboundMetadataSize(16 * 1024 * 1024)
        .build();
IngestionServiceSettings settings =
    IngestionServiceSettings.newBuilder().setTransportChannelProvider(provider).build();
try (IngestionServiceClient ingestionServiceClient = IngestionServiceClient.create(settings)) {
  // ...
}

@jradcliff
jradcliff merged commit a55ef65 into main Oct 20, 2026
7 checks passed
@jradcliff
jradcliff deleted the headers branch October 20, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants