Reference documentation and code samples for the Error Reporting V1beta1 API class Google::Cloud::ErrorReporting::V1beta1::ServiceContext.
Describes a running service that sends errors.
Its version changes over time and multiple versions can run in parallel.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#resource_type
defresource_type()->::String
Returns
(::String) — Type of the MonitoredResource. List of possible values:
https://cloud.google.com/monitoring/api/resources
Value is set automatically for incoming errors and must not be set when
reporting errors.
#resource_type=
defresource_type=(value)->::String
Parameter
value (::String) — Type of the MonitoredResource. List of possible values:
https://cloud.google.com/monitoring/api/resources
Value is set automatically for incoming errors and must not be set when
reporting errors.
Returns
(::String) — Type of the MonitoredResource. List of possible values:
https://cloud.google.com/monitoring/api/resources
Value is set automatically for incoming errors and must not be set when
reporting errors.
#service
defservice()->::String
Returns
(::String) — An identifier of the service, such as the name of the
executable, job, or Google App Engine service name. This field is expected
to have a low number of values that are relatively stable over time, as
opposed to version, which can be changed whenever new code is deployed.
Contains the service name for error reports extracted from Google
App Engine logs or default if the App Engine default service is used.
#service=
defservice=(value)->::String
Parameter
value (::String) — An identifier of the service, such as the name of the
executable, job, or Google App Engine service name. This field is expected
to have a low number of values that are relatively stable over time, as
opposed to version, which can be changed whenever new code is deployed.
Contains the service name for error reports extracted from Google
App Engine logs or default if the App Engine default service is used.
Returns
(::String) — An identifier of the service, such as the name of the
executable, job, or Google App Engine service name. This field is expected
to have a low number of values that are relatively stable over time, as
opposed to version, which can be changed whenever new code is deployed.
Contains the service name for error reports extracted from Google
App Engine logs or default if the App Engine default service is used.
#version
defversion()->::String
Returns
(::String) — Represents the source code version that the developer provided,
which could represent a version label or a Git SHA-1 hash, for example.
For App Engine standard environment, the version is set to the version of
the app.
#version=
defversion=(value)->::String
Parameter
value (::String) — Represents the source code version that the developer provided,
which could represent a version label or a Git SHA-1 hash, for example.
For App Engine standard environment, the version is set to the version of
the app.
Returns
(::String) — Represents the source code version that the developer provided,
which could represent a version label or a Git SHA-1 hash, for example.
For App Engine standard environment, the version is set to the version of
the app.
[[["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-03 UTC."],[],[],null,["# Error Reporting V1beta1 API - Class Google::Cloud::ErrorReporting::V1beta1::ServiceContext (v0.14.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.14.0 (latest)](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-ServiceContext)\n- [0.13.1](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.13.1/Google-Cloud-ErrorReporting-V1beta1-ServiceContext)\n- [0.12.0](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.12.0/Google-Cloud-ErrorReporting-V1beta1-ServiceContext)\n- [0.11.1](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.11.1/Google-Cloud-ErrorReporting-V1beta1-ServiceContext)\n- [0.10.0](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.10.0/Google-Cloud-ErrorReporting-V1beta1-ServiceContext)\n- [0.9.2](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.9.2/Google-Cloud-ErrorReporting-V1beta1-ServiceContext)\n- [0.8.0](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.8.0/Google-Cloud-ErrorReporting-V1beta1-ServiceContext)\n- [0.7.0](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.7.0/Google-Cloud-ErrorReporting-V1beta1-ServiceContext)\n- [0.6.0](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.6.0/Google-Cloud-ErrorReporting-V1beta1-ServiceContext)\n- [0.5.1](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.5.1/Google-Cloud-ErrorReporting-V1beta1-ServiceContext)\n- [0.4.5](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.4.5/Google-Cloud-ErrorReporting-V1beta1-ServiceContext) \nReference documentation and code samples for the Error Reporting V1beta1 API class Google::Cloud::ErrorReporting::V1beta1::ServiceContext.\n\nDescribes a running service that sends errors.\nIts version changes over time and multiple versions can run in parallel. \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### #resource_type\n\n def resource_type() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Type of the MonitoredResource. List of possible values: https://cloud.google.com/monitoring/api/resources\n\n Value is set automatically for incoming errors and must not be set when\n reporting errors.\n\n### #resource_type=\n\n def resource_type=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Type of the MonitoredResource. List of possible values: https://cloud.google.com/monitoring/api/resources\n\n\n Value is set automatically for incoming errors and must not be set when\nreporting errors. \n**Returns**\n\n- (::String) --- Type of the MonitoredResource. List of possible values: https://cloud.google.com/monitoring/api/resources\n\n Value is set automatically for incoming errors and must not be set when\n reporting errors.\n\n### #service\n\n def service() -\u003e ::String\n\n**Returns**\n\n- (::String) --- An identifier of the service, such as the name of the executable, job, or Google App Engine service name. This field is expected to have a low number of values that are relatively stable over time, as opposed to `version`, which can be changed whenever new code is deployed.\n\n\n Contains the service name for error reports extracted from Google\n App Engine logs or `default` if the App Engine default service is used.\n\n### #service=\n\n def service=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- An identifier of the service, such as the name of the executable, job, or Google App Engine service name. This field is expected to have a low number of values that are relatively stable over time, as opposed to `version`, which can be changed whenever new code is deployed.\n\n\n Contains the service name for error reports extracted from Google\nApp Engine logs or `default` if the App Engine default service is used. \n**Returns**\n\n- (::String) --- An identifier of the service, such as the name of the executable, job, or Google App Engine service name. This field is expected to have a low number of values that are relatively stable over time, as opposed to `version`, which can be changed whenever new code is deployed.\n\n\n Contains the service name for error reports extracted from Google\n App Engine logs or `default` if the App Engine default service is used.\n\n### #version\n\n def version() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Represents the source code version that the developer provided, which could represent a version label or a Git SHA-1 hash, for example. For App Engine standard environment, the version is set to the version of the app.\n\n### #version=\n\n def version=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Represents the source code version that the developer provided, which could represent a version label or a Git SHA-1 hash, for example. For App Engine standard environment, the version is set to the version of the app. \n**Returns**\n\n- (::String) --- Represents the source code version that the developer provided, which could represent a version label or a Git SHA-1 hash, for example. For App Engine standard environment, the version is set to the version of the app."]]