[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003e\u003ccode\u003eRetryOptions\u003c/code\u003e is a class within the Google.Cloud.Diagnostics.Common namespace that defines the retry logic for failed requests.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers customizable options for handling exceptions, buffer overflows, buffer size, retry intervals, and the number of retry attempts.\u003c/p\u003e\n"],["\u003cp\u003eDefault values for buffer size, retry attempts, and retry interval are provided as static fields: \u003ccode\u003eDefaultBufferSize\u003c/code\u003e, \u003ccode\u003eDefaultRetryAttempts\u003c/code\u003e, and \u003ccode\u003eDefaultRetryInterval\u003c/code\u003e, respectively.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRetryOptions\u003c/code\u003e can be configured for two retry types: \u003ccode\u003eNone\u003c/code\u003e, which has no retry attempts, and \u003ccode\u003eRetry\u003c/code\u003e, which allows for customizable retry attempts.\u003c/p\u003e\n"],["\u003cp\u003eMethods \u003ccode\u003eNoRetry\u003c/code\u003e and \u003ccode\u003eRetry\u003c/code\u003e provide static ways to create instances of \u003ccode\u003eRetryOptions\u003c/code\u003e with the corresponding retry types, allowing you to change behavior for how to handle exceptions, buffers, retries, and more.\u003c/p\u003e\n"]]],[],null,["# Google.Cloud.Diagnostics.Common - Class RetryOptions (5.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [5.3.0 (latest)](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.RetryOptions)\n- [5.2.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.2.0/Google.Cloud.Diagnostics.Common.RetryOptions)\n- [5.1.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.1.0/Google.Cloud.Diagnostics.Common.RetryOptions)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.0.0/Google.Cloud.Diagnostics.Common.RetryOptions)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.4.0/Google.Cloud.Diagnostics.Common.RetryOptions)\n- [4.3.1](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.3.1/Google.Cloud.Diagnostics.Common.RetryOptions) \n\n public sealed class RetryOptions\n\nReference documentation and code samples for the Google.Cloud.Diagnostics.Common class RetryOptions.\n\nOptions that define retry logic for requests that failed. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e RetryOptions \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Diagnostics.Common](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common)\n\nAssembly\n--------\n\nGoogle.Cloud.Diagnostics.Common.dll\n\nFields\n------\n\n### DefaultBufferSize\n\n public static readonly int DefaultBufferSize\n\nThe default buffer size in bytes. 2\\^18 = 262144.\n\n### DefaultRetryAttempts\n\n public static readonly int DefaultRetryAttempts\n\nThe default number of retry attempts.\n\n### DefaultRetryInterval\n\n public static readonly TimeSpan DefaultRetryInterval\n\nThe default wait time between retries.\n\nProperties\n----------\n\n### BufferOverflow\n\n public BufferOverflow BufferOverflow { get; }\n\nHow to handle a full buffer, only used for [Retry](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.RetryType#Google_Cloud_Diagnostics_Common_RetryType_Retry).\n\n### BufferSizeBytes\n\n public int BufferSizeBytes { get; }\n\nThe size of the buffer in bytes, only used for [Retry](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.RetryType#Google_Cloud_Diagnostics_Common_RetryType_Retry).\n\n### ExceptionHandling\n\n public ExceptionHandling ExceptionHandling { get; }\n\nHow exceptions are handled.\n\n### RetryAttempts\n\n public int RetryAttempts { get; }\n\nThe number of attempts to retry sending information, only used for [Retry](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.RetryType#Google_Cloud_Diagnostics_Common_RetryType_Retry).\n\n### RetryInterval\n\n public TimeSpan RetryInterval { get; }\n\nThe amount of time to wait between retries, only used for [Retry](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.RetryType#Google_Cloud_Diagnostics_Common_RetryType_Retry).\n\n### RetryType\n\n public RetryType RetryType { get; }\n\nThe type of retry to make.\n\nMethods\n-------\n\n### NoRetry(ExceptionHandling)\n\n public static RetryOptions NoRetry(ExceptionHandling exceptionHandling = ExceptionHandling.Ignore)\n\nCreates a [RetryOptions](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.RetryOptions) for [None](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.RetryType#Google_Cloud_Diagnostics_Common_RetryType_None).\n\n### Retry(ExceptionHandling, BufferOverflow, int?, TimeSpan?, int?)\n\n public static RetryOptions Retry(ExceptionHandling exceptionHandling = ExceptionHandling.Ignore, BufferOverflow bufferOverflow = BufferOverflow.IgnoreNewEntries, int? bufferSizeBytes = null, TimeSpan? retryInterval = null, int? retryAttempts = null)\n\nCreates a [RetryOptions](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.RetryOptions) for [Retry](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.RetryType#Google_Cloud_Diagnostics_Common_RetryType_Retry)."]]