(::Float) — Specifies the fraction of operations to write to
Stackdriver Logging.
This field may contain any value between 0.0 and 1.0, inclusive.
0.0 is the default and means that no operations are logged.
#sampling_ratio=
defsampling_ratio=(value)->::Float
Parameter
value (::Float) — Specifies the fraction of operations to write to
Stackdriver Logging.
This field may contain any value between 0.0 and 1.0, inclusive.
0.0 is the default and means that no operations are logged.
Returns
(::Float) — Specifies the fraction of operations to write to
Stackdriver Logging.
This field may contain any value between 0.0 and 1.0, inclusive.
0.0 is the default and means that no operations are logged.
[[["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-09-09 UTC."],[],[],null,["# Cloud Tasks V2 API - Class Google::Cloud::Tasks::V2::StackdriverLoggingConfig (v1.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.0 (latest)](/ruby/docs/reference/google-cloud-tasks-v2/latest/Google-Cloud-Tasks-V2-StackdriverLoggingConfig)\n- [1.2.1](/ruby/docs/reference/google-cloud-tasks-v2/1.2.1/Google-Cloud-Tasks-V2-StackdriverLoggingConfig)\n- [1.1.0](/ruby/docs/reference/google-cloud-tasks-v2/1.1.0/Google-Cloud-Tasks-V2-StackdriverLoggingConfig)\n- [1.0.1](/ruby/docs/reference/google-cloud-tasks-v2/1.0.1/Google-Cloud-Tasks-V2-StackdriverLoggingConfig)\n- [0.11.0](/ruby/docs/reference/google-cloud-tasks-v2/0.11.0/Google-Cloud-Tasks-V2-StackdriverLoggingConfig)\n- [0.10.2](/ruby/docs/reference/google-cloud-tasks-v2/0.10.2/Google-Cloud-Tasks-V2-StackdriverLoggingConfig)\n- [0.9.0](/ruby/docs/reference/google-cloud-tasks-v2/0.9.0/Google-Cloud-Tasks-V2-StackdriverLoggingConfig)\n- [0.8.2](/ruby/docs/reference/google-cloud-tasks-v2/0.8.2/Google-Cloud-Tasks-V2-StackdriverLoggingConfig)\n- [0.7.0](/ruby/docs/reference/google-cloud-tasks-v2/0.7.0/Google-Cloud-Tasks-V2-StackdriverLoggingConfig)\n- [0.6.0](/ruby/docs/reference/google-cloud-tasks-v2/0.6.0/Google-Cloud-Tasks-V2-StackdriverLoggingConfig)\n- [0.5.0](/ruby/docs/reference/google-cloud-tasks-v2/0.5.0/Google-Cloud-Tasks-V2-StackdriverLoggingConfig)\n- [0.4.6](/ruby/docs/reference/google-cloud-tasks-v2/0.4.6/Google-Cloud-Tasks-V2-StackdriverLoggingConfig) \nReference documentation and code samples for the Cloud Tasks V2 API class Google::Cloud::Tasks::V2::StackdriverLoggingConfig.\n\nConfiguration options for writing logs to\n[Stackdriver Logging](https://cloud.google.com/logging/docs/). \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### #sampling_ratio\n\n def sampling_ratio() -\u003e ::Float\n\n**Returns**\n\n- (::Float) --- Specifies the fraction of operations to write to [Stackdriver Logging](https://cloud.google.com/logging/docs/). This field may contain any value between 0.0 and 1.0, inclusive. 0.0 is the default and means that no operations are logged.\n\n### #sampling_ratio=\n\n def sampling_ratio=(value) -\u003e ::Float\n\n**Parameter**\n\n- **value** (::Float) --- Specifies the fraction of operations to write to [Stackdriver Logging](https://cloud.google.com/logging/docs/). This field may contain any value between 0.0 and 1.0, inclusive. 0.0 is the default and means that no operations are logged. \n**Returns**\n\n- (::Float) --- Specifies the fraction of operations to write to [Stackdriver Logging](https://cloud.google.com/logging/docs/). This field may contain any value between 0.0 and 1.0, inclusive. 0.0 is the default and means that no operations are logged."]]