Reference documentation and code samples for the Google API Common Protos Client class Exemplar.
Exemplars are example points that may be used to annotate aggregated
distribution values. They are metadata that gives information about a
particular value added to a Distribution bucket, such as a trace ID that
was active when a value was added. They may contain further information,
such as a example values and timestamps, origin, etc.
Generated from protobuf messagegoogle.api.Distribution.Exemplar
Namespace
Google \ Api \ Distribution
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ value
float
Value of the exemplar point. This value determines to which bucket the exemplar belongs.
Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.
getValue
Value of the exemplar point. This value determines to which bucket the
exemplar belongs.
Returns
Type
Description
float
setValue
Value of the exemplar point. This value determines to which bucket the
exemplar belongs.
Parameter
Name
Description
var
float
Returns
Type
Description
$this
getTimestamp
The observation (sampling) time of the above value.
Contextual information about the example value. Examples are:
Trace: type.googleapis.com/google.monitoring.v3.SpanContext
Literal string: type.googleapis.com/google.protobuf.StringValue
Labels dropped during aggregation:
type.googleapis.com/google.monitoring.v3.DroppedLabels
There may be only a single attachment of any given message type in a
single exemplar, and this is enforced by the system.
Contextual information about the example value. Examples are:
Trace: type.googleapis.com/google.monitoring.v3.SpanContext
Literal string: type.googleapis.com/google.protobuf.StringValue
Labels dropped during aggregation:
type.googleapis.com/google.monitoring.v3.DroppedLabels
There may be only a single attachment of any given message type in a
single exemplar, and this is enforced by the system.
[[["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 Exemplar (4.12.3)\n\nVersion latestkeyboard_arrow_down\n\n- [4.12.3 (latest)](/php/docs/reference/common-protos/latest/Api.Distribution.Exemplar)\n- [4.12.2](/php/docs/reference/common-protos/4.12.2/Api.Distribution.Exemplar)\n- [4.11.0](/php/docs/reference/common-protos/4.11.0/Api.Distribution.Exemplar)\n- [4.10.0](/php/docs/reference/common-protos/4.10.0/Api.Distribution.Exemplar)\n- [4.9.0](/php/docs/reference/common-protos/4.9.0/Api.Distribution.Exemplar)\n- [4.8.3](/php/docs/reference/common-protos/4.8.3/Api.Distribution.Exemplar) \nReference documentation and code samples for the Google API Common Protos Client class Exemplar.\n\nExemplars are example points that may be used to annotate aggregated\ndistribution values. They are metadata that gives information about a\nparticular value added to a Distribution bucket, such as a trace ID that\nwas active when a value was added. They may contain further information,\nsuch as a example values and timestamps, origin, etc.\n\nGenerated from protobuf message `google.api.Distribution.Exemplar`\n\nNamespace\n---------\n\nGoogle \\\\ Api \\\\ Distribution\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getValue\n\nValue of the exemplar point. This value determines to which bucket the\nexemplar belongs.\n\n### setValue\n\nValue of the exemplar point. This value determines to which bucket the\nexemplar belongs.\n\n### getTimestamp\n\nThe observation (sampling) time of the above value.\n\n### hasTimestamp\n\n### clearTimestamp\n\n### setTimestamp\n\nThe observation (sampling) time of the above value.\n\n### getAttachments\n\nContextual information about the example value. Examples are:\nTrace: type.googleapis.com/google.monitoring.v3.SpanContext\nLiteral string: type.googleapis.com/google.protobuf.StringValue\nLabels dropped during aggregation:\ntype.googleapis.com/google.monitoring.v3.DroppedLabels\nThere may be only a single attachment of any given message type in a\nsingle exemplar, and this is enforced by the system.\n\n### setAttachments\n\nContextual information about the example value. Examples are:\nTrace: type.googleapis.com/google.monitoring.v3.SpanContext\nLiteral string: type.googleapis.com/google.protobuf.StringValue\nLabels dropped during aggregation:\ntype.googleapis.com/google.monitoring.v3.DroppedLabels\nThere may be only a single attachment of any given message type in a\nsingle exemplar, and this is enforced by the system."]]