Struct GrpcMetricsExportTimeoutOption (3.4.0-rc)

gRPC telemetry export timeout.

When EnableGrpcMetrics is enabled, this option controls the maximum time to wait for metrics to be exported to Google Cloud Monitoring. The default is 30 seconds.

This timeout is particularly important for short-lived programs. Setting a lower timeout ensures metrics are flushed before the program exits. For long-running services, the default value is appropriate.

Example: Configure for short-lived programs
namespace gcs_ex = google::cloud::storage_experimental;
auto client = google::cloud::storage::MakeGrpcClient(
    google::cloud::Options{}
        .set<gcs_ex::EnableGrpcMetricsOption>(true)
        .set<gcs_ex::GrpcMetricsPeriodOption>(
            std::chrono::seconds(5))
        .set<gcs_ex::GrpcMetricsExportTimeoutOption>(
            std::chrono::seconds(2)));

Type Aliases

Type

Alias Of: std::chrono::seconds