Reference documentation and code samples for the Stackdriver Monitoring V3 Client class BasicSli.
An SLI measuring performance on a well-known service type. Performance will
be computed on the basis of pre-defined metrics. The type of theservice_resourcedetermines the metrics to use and theservice_resource.labelsandmetric_labelsare used to construct a
monitoring filter to filter that metric down to just the data relevant to
this service.
Generated from protobuf messagegoogle.monitoring.v3.BasicSli
Namespace
Google \ Cloud \ Monitoring \ V3
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ method
array
OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from other methods will not be used to calculate performance for this SLI. If omitted, this SLI applies to all the Service's methods. For service types that don't support breaking down by method, setting this field will result in an error.
↳ location
array
OPTIONAL: The set of locations to which this SLI is relevant. Telemetry from other locations will not be used to calculate performance for this SLI. If omitted, this SLI applies to all locations in which the Service has activity. For service types that don't support breaking down by location, setting this field will result in an error.
↳ version
array
OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry from other API versions will not be used to calculate performance for this SLI. If omitted, this SLI applies to all API versions. For service types that don't support breaking down by version, setting this field will result in an error.
Good service is defined to be the count of requests made to this service that are fast enough with respect tolatency.threshold.
getMethod
OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from
other methods will not be used to calculate performance for this SLI. If
omitted, this SLI applies to all the Service's methods. For service types
that don't support breaking down by method, setting this field will result
in an error.
OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from
other methods will not be used to calculate performance for this SLI. If
omitted, this SLI applies to all the Service's methods. For service types
that don't support breaking down by method, setting this field will result
in an error.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getLocation
OPTIONAL: The set of locations to which this SLI is relevant. Telemetry
from other locations will not be used to calculate performance for this
SLI. If omitted, this SLI applies to all locations in which the Service has
activity. For service types that don't support breaking down by location,
setting this field will result in an error.
OPTIONAL: The set of locations to which this SLI is relevant. Telemetry
from other locations will not be used to calculate performance for this
SLI. If omitted, this SLI applies to all locations in which the Service has
activity. For service types that don't support breaking down by location,
setting this field will result in an error.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getVersion
OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry
from other API versions will not be used to calculate performance for this
SLI. If omitted, this SLI applies to all API versions. For service types
that don't support breaking down by version, setting this field will result
in an error.
OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry
from other API versions will not be used to calculate performance for this
SLI. If omitted, this SLI applies to all API versions. For service types
that don't support breaking down by version, setting this field will result
in an error.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getAvailability
Good service is defined to be the count of requests made to this service
that return successfully.
[[["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,["# Stackdriver Monitoring V3 Client - Class BasicSli (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-monitoring/latest/V3.BasicSli)\n- [2.1.1](/php/docs/reference/cloud-monitoring/2.1.1/V3.BasicSli)\n- [2.0.1](/php/docs/reference/cloud-monitoring/2.0.1/V3.BasicSli)\n- [1.12.1](/php/docs/reference/cloud-monitoring/1.12.1/V3.BasicSli)\n- [1.11.1](/php/docs/reference/cloud-monitoring/1.11.1/V3.BasicSli)\n- [1.10.3](/php/docs/reference/cloud-monitoring/1.10.3/V3.BasicSli)\n- [1.9.0](/php/docs/reference/cloud-monitoring/1.9.0/V3.BasicSli)\n- [1.8.0](/php/docs/reference/cloud-monitoring/1.8.0/V3.BasicSli)\n- [1.7.1](/php/docs/reference/cloud-monitoring/1.7.1/V3.BasicSli)\n- [1.6.0](/php/docs/reference/cloud-monitoring/1.6.0/V3.BasicSli)\n- [1.5.1](/php/docs/reference/cloud-monitoring/1.5.1/V3.BasicSli)\n- [1.4.0](/php/docs/reference/cloud-monitoring/1.4.0/V3.BasicSli)\n- [1.3.2](/php/docs/reference/cloud-monitoring/1.3.2/V3.BasicSli)\n- [1.2.2](/php/docs/reference/cloud-monitoring/1.2.2/V3.BasicSli) \nReference documentation and code samples for the Stackdriver Monitoring V3 Client class BasicSli.\n\nAn SLI measuring performance on a well-known service type. Performance will\nbe computed on the basis of pre-defined metrics. The type of the\n`service_resource` determines the metrics to use and the\n`service_resource.labels` and `metric_labels` are used to construct a\nmonitoring filter to filter that metric down to just the data relevant to\nthis service.\n\nGenerated from protobuf message `google.monitoring.v3.BasicSli`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Monitoring \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getMethod\n\nOPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from\nother methods will not be used to calculate performance for this SLI. If\nomitted, this SLI applies to all the Service's methods. For service types\nthat don't support breaking down by method, setting this field will result\nin an error.\n\n### setMethod\n\nOPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from\nother methods will not be used to calculate performance for this SLI. If\nomitted, this SLI applies to all the Service's methods. For service types\nthat don't support breaking down by method, setting this field will result\nin an error.\n\n### getLocation\n\nOPTIONAL: The set of locations to which this SLI is relevant. Telemetry\nfrom other locations will not be used to calculate performance for this\nSLI. If omitted, this SLI applies to all locations in which the Service has\nactivity. For service types that don't support breaking down by location,\nsetting this field will result in an error.\n\n### setLocation\n\nOPTIONAL: The set of locations to which this SLI is relevant. Telemetry\nfrom other locations will not be used to calculate performance for this\nSLI. If omitted, this SLI applies to all locations in which the Service has\nactivity. For service types that don't support breaking down by location,\nsetting this field will result in an error.\n\n### getVersion\n\nOPTIONAL: The set of API versions to which this SLI is relevant. Telemetry\nfrom other API versions will not be used to calculate performance for this\nSLI. If omitted, this SLI applies to all API versions. For service types\nthat don't support breaking down by version, setting this field will result\nin an error.\n\n### setVersion\n\nOPTIONAL: The set of API versions to which this SLI is relevant. Telemetry\nfrom other API versions will not be used to calculate performance for this\nSLI. If omitted, this SLI applies to all API versions. For service types\nthat don't support breaking down by version, setting this field will result\nin an error.\n\n### getAvailability\n\nGood service is defined to be the count of requests made to this service\nthat return successfully.\n\n### hasAvailability\n\n### setAvailability\n\nGood service is defined to be the count of requests made to this service\nthat return successfully.\n\n### getLatency\n\nGood service is defined to be the count of requests made to this service\nthat are fast enough with respect to `latency.threshold`.\n\n### hasLatency\n\n### setLatency\n\nGood service is defined to be the count of requests made to this service\nthat are fast enough with respect to `latency.threshold`.\n\n### getSliCriteria"]]