Reference documentation and code samples for the Cloud Logging V2 API class Google::Api::Distribution::BucketOptions.
BucketOptions describes the bucket boundaries used to create a histogram
for the distribution. The buckets can be in a linear sequence, an
exponential sequence, or each bucket can be specified explicitly.
BucketOptions does not include the number of values in each bucket.
A bucket has an inclusive lower bound and exclusive upper bound for the
values that are counted for that bucket. The upper bound of a bucket must
be strictly greater than the lower bound. The sequence of N buckets for a
distribution consists of an underflow bucket (number 0), zero or more
finite buckets (number 1 through N - 2) and an overflow bucket (number N -
1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the
same as the upper bound of bucket i - 1. The buckets span the whole range
of finite values: lower bound of the underflow bucket is -infinity and the
upper bound of the overflow bucket is +infinity. The finite buckets are
so-called because both bounds are finite.
Note: The following fields are mutually exclusive: explicit_buckets, linear_buckets, exponential_buckets. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: explicit_buckets, linear_buckets, exponential_buckets. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: explicit_buckets, linear_buckets, exponential_buckets. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: exponential_buckets, linear_buckets, explicit_buckets. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: exponential_buckets, linear_buckets, explicit_buckets. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: exponential_buckets, linear_buckets, explicit_buckets. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: linear_buckets, exponential_buckets, explicit_buckets. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: linear_buckets, exponential_buckets, explicit_buckets. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: linear_buckets, exponential_buckets, explicit_buckets. If a field in that set is populated, all other fields in the set will automatically be cleared.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Cloud Logging V2 API - Class Google::Api::Distribution::BucketOptions (v1.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.0 (latest)](/ruby/docs/reference/google-cloud-logging-v2/latest/Google-Api-Distribution-BucketOptions)\n- [1.2.1](/ruby/docs/reference/google-cloud-logging-v2/1.2.1/Google-Api-Distribution-BucketOptions)\n- [1.1.0](/ruby/docs/reference/google-cloud-logging-v2/1.1.0/Google-Api-Distribution-BucketOptions)\n- [1.0.1](/ruby/docs/reference/google-cloud-logging-v2/1.0.1/Google-Api-Distribution-BucketOptions)\n- [0.13.0](/ruby/docs/reference/google-cloud-logging-v2/0.13.0/Google-Api-Distribution-BucketOptions)\n- [0.12.2](/ruby/docs/reference/google-cloud-logging-v2/0.12.2/Google-Api-Distribution-BucketOptions)\n- [0.11.0](/ruby/docs/reference/google-cloud-logging-v2/0.11.0/Google-Api-Distribution-BucketOptions)\n- [0.10.1](/ruby/docs/reference/google-cloud-logging-v2/0.10.1/Google-Api-Distribution-BucketOptions)\n- [0.9.0](/ruby/docs/reference/google-cloud-logging-v2/0.9.0/Google-Api-Distribution-BucketOptions)\n- [0.8.1](/ruby/docs/reference/google-cloud-logging-v2/0.8.1/Google-Api-Distribution-BucketOptions)\n- [0.7.0](/ruby/docs/reference/google-cloud-logging-v2/0.7.0/Google-Api-Distribution-BucketOptions)\n- [0.6.0](/ruby/docs/reference/google-cloud-logging-v2/0.6.0/Google-Api-Distribution-BucketOptions)\n- [0.5.6](/ruby/docs/reference/google-cloud-logging-v2/0.5.6/Google-Api-Distribution-BucketOptions) \nReference documentation and code samples for the Cloud Logging V2 API class Google::Api::Distribution::BucketOptions.\n\n`BucketOptions` describes the bucket boundaries used to create a histogram\nfor the distribution. The buckets can be in a linear sequence, an\nexponential sequence, or each bucket can be specified explicitly.\n`BucketOptions` does not include the number of values in each bucket.\n\n\n\u003cbr /\u003e\n\nA bucket has an inclusive lower bound and exclusive upper bound for the\nvalues that are counted for that bucket. The upper bound of a bucket must\nbe strictly greater than the lower bound. The sequence of N buckets for a\ndistribution consists of an underflow bucket (number 0), zero or more\nfinite buckets (number 1 through N - 2) and an overflow bucket (number N -\n1). The buckets are contiguous: the lower bound of bucket i (i \\\u003e 0) is the\nsame as the upper bound of bucket i - 1. The buckets span the whole range\nof finite values: lower bound of the underflow bucket is -infinity and the\nupper bound of the overflow bucket is +infinity. The finite buckets are\nso-called because both bounds are finite. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #explicit_buckets\n\n def explicit_buckets() -\u003e ::Google::Api::Distribution::BucketOptions::Explicit\n\n**Returns**\n\n- ([::Google::Api::Distribution::BucketOptions::Explicit](./Google-Api-Distribution-BucketOptions-Explicit)) --- The explicit buckets.\n\n\n Note: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #explicit_buckets=\n\n def explicit_buckets=(value) -\u003e ::Google::Api::Distribution::BucketOptions::Explicit\n\n**Parameter**\n\n- **value** ([::Google::Api::Distribution::BucketOptions::Explicit](./Google-Api-Distribution-BucketOptions-Explicit)) --- The explicit buckets.\n\n\nNote: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Api::Distribution::BucketOptions::Explicit](./Google-Api-Distribution-BucketOptions-Explicit)) --- The explicit buckets.\n\n\n Note: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #exponential_buckets\n\n def exponential_buckets() -\u003e ::Google::Api::Distribution::BucketOptions::Exponential\n\n**Returns**\n\n- ([::Google::Api::Distribution::BucketOptions::Exponential](./Google-Api-Distribution-BucketOptions-Exponential)) --- The exponential buckets.\n\n\n Note: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #exponential_buckets=\n\n def exponential_buckets=(value) -\u003e ::Google::Api::Distribution::BucketOptions::Exponential\n\n**Parameter**\n\n- **value** ([::Google::Api::Distribution::BucketOptions::Exponential](./Google-Api-Distribution-BucketOptions-Exponential)) --- The exponential buckets.\n\n\nNote: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Api::Distribution::BucketOptions::Exponential](./Google-Api-Distribution-BucketOptions-Exponential)) --- The exponential buckets.\n\n\n Note: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #linear_buckets\n\n def linear_buckets() -\u003e ::Google::Api::Distribution::BucketOptions::Linear\n\n**Returns**\n\n- ([::Google::Api::Distribution::BucketOptions::Linear](./Google-Api-Distribution-BucketOptions-Linear)) --- The linear bucket.\n\n\n Note: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #linear_buckets=\n\n def linear_buckets=(value) -\u003e ::Google::Api::Distribution::BucketOptions::Linear\n\n**Parameter**\n\n- **value** ([::Google::Api::Distribution::BucketOptions::Linear](./Google-Api-Distribution-BucketOptions-Linear)) --- The linear bucket.\n\n\nNote: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Api::Distribution::BucketOptions::Linear](./Google-Api-Distribution-BucketOptions-Linear)) --- The linear bucket.\n\n\n Note: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared."]]