public virtual Task<Profile> CreateOfflineProfile(CreateOfflineProfileRequest request, ServerCallContext context)
CreateOfflineProfile creates a new profile resource in the offline
mode. The client provides the profile to create along with the profile
bytes, the server records it.
Direct use of this API is discouraged, please use a supported
profiler
agent
instead for profile collection.
public virtual Task<Profile> CreateProfile(CreateProfileRequest request, ServerCallContext context)
CreateProfile creates a new profile resource in the online mode.
Direct use of this API is discouraged, please use a supported
profiler
agent
instead for profile collection.
The server ensures that the new profiles are created at a constant rate per
deployment, so the creation request may hang for some time until the next
profile session is available.
The request may fail with ABORTED error if the creation is not available
within ~1m, the response will indicate the duration of the backoff the
client should take before attempting creating a profile again. The backoff
duration is returned in google.rpc.RetryInfo extension on the response
status. To a gRPC client, the extension will be return as a
binary-serialized proto in the trailing metadata item named
"google.rpc.retryinfo-bin".
public virtual Task<Profile> UpdateProfile(UpdateProfileRequest request, ServerCallContext context)
UpdateProfile updates the profile bytes and labels on the profile resource
created in the online mode. Updating the bytes for profiles created in the
offline mode is currently not supported: the profile content must be
provided at the time of the profile creation.
Direct use of this API is discouraged, please use a supported
profiler
agent
instead for profile collection.
[[["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."],[[["\u003cp\u003eThe \u003ccode\u003eProfilerService.ProfilerServiceBase\u003c/code\u003e class provides the base for server-side implementations of the Cloud Profiler v2 API.\u003c/p\u003e\n"],["\u003cp\u003eThe API offers methods like \u003ccode\u003eCreateOfflineProfile\u003c/code\u003e, \u003ccode\u003eCreateProfile\u003c/code\u003e, and \u003ccode\u003eUpdateProfile\u003c/code\u003e to manage profile resources, including those created in offline and online modes.\u003c/p\u003e\n"],["\u003cp\u003eVersion 2.6.0 is the latest available version for the Google.Cloud.Profiler.V2 API, with other older versions listed.\u003c/p\u003e\n"],["\u003cp\u003eDirect usage of the API is discouraged in favor of utilizing supported profiler agents for profile collection.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCreateProfile\u003c/code\u003e method may have a delayed response due to the server ensuring a constant rate of profile creation per deployment, which can be resolved with retry.\u003c/p\u003e\n"]]],[],null,["# Cloud Profiler v2 API - Class ProfilerService.ProfilerServiceBase (2.6.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.0 (latest)](/dotnet/docs/reference/Google.Cloud.Profiler.V2/latest/Google.Cloud.Profiler.V2.ProfilerService.ProfilerServiceBase)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/2.5.0/Google.Cloud.Profiler.V2.ProfilerService.ProfilerServiceBase)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/2.4.0/Google.Cloud.Profiler.V2.ProfilerService.ProfilerServiceBase)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/2.3.0/Google.Cloud.Profiler.V2.ProfilerService.ProfilerServiceBase)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/2.2.0/Google.Cloud.Profiler.V2.ProfilerService.ProfilerServiceBase)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/2.1.0/Google.Cloud.Profiler.V2.ProfilerService.ProfilerServiceBase)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/2.0.0/Google.Cloud.Profiler.V2.ProfilerService.ProfilerServiceBase)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/1.2.0/Google.Cloud.Profiler.V2.ProfilerService.ProfilerServiceBase)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/1.1.0/Google.Cloud.Profiler.V2.ProfilerService.ProfilerServiceBase)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/1.0.0/Google.Cloud.Profiler.V2.ProfilerService.ProfilerServiceBase) \n\n [BindServiceMethod(typeof(ProfilerService), \"BindService\")]\n public abstract class ProfilerService.ProfilerServiceBase\n\nReference documentation and code samples for the Cloud Profiler v2 API class ProfilerService.ProfilerServiceBase.\n\nBase class for server-side implementations of ProfilerService \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ProfilerService.ProfilerServiceBase \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.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Profiler.V2](/dotnet/docs/reference/Google.Cloud.Profiler.V2/latest/Google.Cloud.Profiler.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Profiler.V2.dll\n\nMethods\n-------\n\n### CreateOfflineProfile(CreateOfflineProfileRequest, ServerCallContext)\n\n public virtual Task\u003cProfile\u003e CreateOfflineProfile(CreateOfflineProfileRequest request, ServerCallContext context)\n\nCreateOfflineProfile creates a new profile resource in the offline\nmode. The client provides the profile to create along with the profile\nbytes, the server records it.\n\n*Direct use of this API is discouraged, please use a [supported\nprofiler\nagent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)\ninstead for profile collection.*\n\n### CreateProfile(CreateProfileRequest, ServerCallContext)\n\n public virtual Task\u003cProfile\u003e CreateProfile(CreateProfileRequest request, ServerCallContext context)\n\nCreateProfile creates a new profile resource in the online mode.\n\n*Direct use of this API is discouraged, please use a [supported\nprofiler\nagent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)\ninstead for profile collection.*\n\nThe server ensures that the new profiles are created at a constant rate per\ndeployment, so the creation request may hang for some time until the next\nprofile session is available.\n\nThe request may fail with ABORTED error if the creation is not available\nwithin \\~1m, the response will indicate the duration of the backoff the\nclient should take before attempting creating a profile again. The backoff\nduration is returned in google.rpc.RetryInfo extension on the response\nstatus. To a gRPC client, the extension will be return as a\nbinary-serialized proto in the trailing metadata item named\n\"google.rpc.retryinfo-bin\".\n\n### UpdateProfile(UpdateProfileRequest, ServerCallContext)\n\n public virtual Task\u003cProfile\u003e UpdateProfile(UpdateProfileRequest request, ServerCallContext context)\n\nUpdateProfile updates the profile bytes and labels on the profile resource\ncreated in the online mode. Updating the bytes for profiles created in the\noffline mode is currently not supported: the profile content must be\nprovided at the time of the profile creation.\n\n*Direct use of this API is discouraged, please use a [supported\nprofiler\nagent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)\ninstead for profile collection.*"]]