Reference documentation and code samples for the Google API Common Protos Client class AttributeContext.
This message defines the standard attribute vocabulary for Google APIs.
An attribute is a piece of metadata that describes an activity on a network
service. For example, the size of an HTTP request, or the status code of
an HTTP response.
Each attribute has a type and a name, which is logically defined as
a proto message field inAttributeContext. The field type becomes the
attribute type, and the field path becomes the attribute name. For example,
the attributesource.ipmaps to fieldAttributeContext.source.ip.
This message definition is guaranteed not to have any wire breaking change.
So you can use it directly for passing attributes across different systems.
NOTE: Different system may generate different subset of attributes. Please
verify the system specification before relying on an attribute generated
a system.
Generated from protobuf messagegoogle.rpc.context.AttributeContext
The origin of a network activity. In a multi hop network activity, the origin represents the sender of the first hop. For the first hop, thesourceand theoriginmust have the same content.
The source of a network activity, such as starting a TCP connection. In a multi hop network activity, the source represents the sender of the last hop.
The destination of a network activity, such as accepting a TCP connection. In a multi hop network activity, the destination represents the receiver of the last hop.
Represents a target resource that is involved with a network activity. If multiple resources are involved with an activity, this must be the primary one.
Supports extensions for advanced use cases, such as logs and metrics.
getOrigin
The origin of a network activity. In a multi hop network activity,
the origin represents the sender of the first hop. For the first hop,
thesourceand theoriginmust have the same content.
The origin of a network activity. In a multi hop network activity,
the origin represents the sender of the first hop. For the first hop,
thesourceand theoriginmust have the same content.
[[["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-04 UTC."],[],[],null,["# Google API Common Protos Client - Class AttributeContext (4.12.3)\n\nVersion latestkeyboard_arrow_down\n\n- [4.12.3 (latest)](/php/docs/reference/common-protos/latest/Rpc.Context.AttributeContext)\n- [4.12.2](/php/docs/reference/common-protos/4.12.2/Rpc.Context.AttributeContext)\n- [4.11.0](/php/docs/reference/common-protos/4.11.0/Rpc.Context.AttributeContext)\n- [4.10.0](/php/docs/reference/common-protos/4.10.0/Rpc.Context.AttributeContext)\n- [4.9.0](/php/docs/reference/common-protos/4.9.0/Rpc.Context.AttributeContext)\n- [4.8.3](/php/docs/reference/common-protos/4.8.3/Rpc.Context.AttributeContext) \nReference documentation and code samples for the Google API Common Protos Client class AttributeContext.\n\nThis message defines the standard attribute vocabulary for Google APIs.\n\nAn attribute is a piece of metadata that describes an activity on a network\nservice. For example, the size of an HTTP request, or the status code of\nan HTTP response.\nEach attribute has a type and a name, which is logically defined as\na proto message field in `AttributeContext`. The field type becomes the\nattribute type, and the field path becomes the attribute name. For example,\nthe attribute `source.ip` maps to field `AttributeContext.source.ip`.\nThis message definition is guaranteed not to have any wire breaking change.\nSo you can use it directly for passing attributes across different systems.\nNOTE: Different system may generate different subset of attributes. Please\nverify the system specification before relying on an attribute generated\na system.\n\nGenerated from protobuf message `google.rpc.context.AttributeContext`\n\nNamespace\n---------\n\nGoogle \\\\ Rpc \\\\ Context\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getOrigin\n\nThe origin of a network activity. In a multi hop network activity,\nthe origin represents the sender of the first hop. For the first hop,\nthe `source` and the `origin` must have the same content.\n\n### hasOrigin\n\n### clearOrigin\n\n### setOrigin\n\nThe origin of a network activity. In a multi hop network activity,\nthe origin represents the sender of the first hop. For the first hop,\nthe `source` and the `origin` must have the same content.\n\n### getSource\n\nThe source of a network activity, such as starting a TCP connection.\n\nIn a multi hop network activity, the source represents the sender of the\nlast hop.\n\n### hasSource\n\n### clearSource\n\n### setSource\n\nThe source of a network activity, such as starting a TCP connection.\n\nIn a multi hop network activity, the source represents the sender of the\nlast hop.\n\n### getDestination\n\nThe destination of a network activity, such as accepting a TCP connection.\n\nIn a multi hop network activity, the destination represents the receiver of\nthe last hop.\n\n### hasDestination\n\n### clearDestination\n\n### setDestination\n\nThe destination of a network activity, such as accepting a TCP connection.\n\nIn a multi hop network activity, the destination represents the receiver of\nthe last hop.\n\n### getRequest\n\nRepresents a network request, such as an HTTP request.\n\n### hasRequest\n\n### clearRequest\n\n### setRequest\n\nRepresents a network request, such as an HTTP request.\n\n### getResponse\n\nRepresents a network response, such as an HTTP response.\n\n### hasResponse\n\n### clearResponse\n\n### setResponse\n\nRepresents a network response, such as an HTTP response.\n\n### getResource\n\nRepresents a target resource that is involved with a network activity.\n\nIf multiple resources are involved with an activity, this must be the\nprimary one.\n\n### hasResource\n\n### clearResource\n\n### setResource\n\nRepresents a target resource that is involved with a network activity.\n\nIf multiple resources are involved with an activity, this must be the\nprimary one.\n\n### getApi\n\nRepresents an API operation that is involved to a network activity.\n\n### hasApi\n\n### clearApi\n\n### setApi\n\nRepresents an API operation that is involved to a network activity.\n\n### getExtensions\n\nSupports extensions for advanced use cases, such as logs and metrics.\n\n### setExtensions\n\nSupports extensions for advanced use cases, such as logs and metrics."]]