Stackdriver Trace V1 Client - Class ListTracesRequest (2.0.0-RC1)

Reference documentation and code samples for the Stackdriver Trace V1 Client class ListTracesRequest.

The request message for the ListTraces method. All fields are required unless specified.

Generated from protobuf message google.devtools.cloudtrace.v1.ListTracesRequest

Namespace

Google \ Cloud \ Trace \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ project_id string

Required. ID of the Cloud project where the trace data is stored.

↳ view int

Optional. Type of data returned for traces in the list. Default is MINIMAL.

↳ page_size int

Optional. Maximum number of traces to return. If not specified or <= 0, the implementation selects a reasonable value. The implementation may return fewer traces than the requested page size.

↳ page_token string

Token identifying the page of results to return. If provided, use the value of the next_page_token field from a previous request.

↳ start_time Google\Protobuf\Timestamp

Start of the time interval (inclusive) during which the trace data was collected from the application.

↳ end_time Google\Protobuf\Timestamp

End of the time interval (inclusive) during which the trace data was collected from the application.

↳ filter string

Optional. A filter against labels for the request. By default, searches use prefix matching. To specify exact match, prepend a plus symbol (+) to the search term. Multiple terms are ANDed. Syntax: * * root:NAME_PREFIX or NAME_PREFIX: Return traces where any root span starts with NAME_PREFIX. * * +root:NAME or +NAME: Return traces where any root span's name is exactly NAME. * * span:NAME_PREFIX: Return traces where any span starts with NAME_PREFIX. * * +span:NAME: Return traces where any span's name is exactly NAME. * * latency:DURATION: Return traces whose overall latency is greater or equal to than DURATION. Accepted units are nanoseconds (ns), milliseconds (ms), and seconds (s). Default is ms. For example, latency:24ms returns traces whose overall latency is greater than or equal to 24 milliseconds. * * label:LABEL_KEY: Return all traces containing the specified label key (exact match, case-sensitive) regardless of the key:value pair's value (including empty values). * * LABEL_KEY:VALUE_PREFIX: Return all traces containing the specified label key (exact match, case-sensitive) whose value starts with VALUE_PREFIX. Both a key and a value must be specified. * * +LABEL_KEY:VALUE: Return all traces containing a key:value pair exactly matching the specified text. Both a key and a value must be specified. * * method:VALUE: Equivalent to /http/method:VALUE. * * url:VALUE: Equivalent to /http/url:VALUE.

↳ order_by string

Optional. Field used to sort the returned traces. Can be one of the following: * * trace_id * * name (name field of root span in the trace) * * duration (difference between end_time and start_time fields of the root span) * * start (start_time field of the root span) Descending order can be specified by appending desc to the sort field (for example, name desc). Only one sort field is permitted.

getProjectId

Required. ID of the Cloud project where the trace data is stored.

Returns
Type Description
string

setProjectId

Required. ID of the Cloud project where the trace data is stored.

Parameter
Name Description
var string
Returns
Type Description
$this

getView

Optional. Type of data returned for traces in the list. Default is MINIMAL.

Returns
Type Description
int Enum of type ViewType.

setView

Optional. Type of data returned for traces in the list. Default is MINIMAL.

Parameter
Name Description
var int

Enum of type ViewType.

Returns
Type Description
$this

getPageSize

Optional. Maximum number of traces to return. If not specified or <= 0, the implementation selects a reasonable value. The implementation may return fewer traces than the requested page size.

Returns
Type Description
int

setPageSize

Optional. Maximum number of traces to return. If not specified or <= 0, the implementation selects a reasonable value. The implementation may return fewer traces than the requested page size.

Parameter
Name Description
var int
Returns
Type Description
$this

getPageToken

Token identifying the page of results to return. If provided, use the value of the next_page_token field from a previous request.

Returns
Type Description
string

setPageToken

Token identifying the page of results to return. If provided, use the value of the next_page_token field from a previous request.

Parameter
Name Description
var string
Returns
Type Description
$this

getStartTime

Start of the time interval (inclusive) during which the trace data was collected from the application.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasStartTime

clearStartTime

setStartTime

Start of the time interval (inclusive) during which the trace data was collected from the application.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getEndTime

End of the time interval (inclusive) during which the trace data was collected from the application.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasEndTime

clearEndTime

setEndTime

End of the time interval (inclusive) during which the trace data was collected from the application.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getFilter

Optional. A filter against labels for the request.

By default, searches use prefix matching. To specify exact match, prepend a plus symbol (+) to the search term. Multiple terms are ANDed. Syntax:

  • root:NAME_PREFIX or NAME_PREFIX: Return traces where any root span starts with NAME_PREFIX.
  • +root:NAME or +NAME: Return traces where any root span's name is exactly NAME.
  • span:NAME_PREFIX: Return traces where any span starts with NAME_PREFIX.
  • +span:NAME: Return traces where any span's name is exactly NAME.
  • latency:DURATION: Return traces whose overall latency is greater or equal to than DURATION. Accepted units are nanoseconds (ns), milliseconds (ms), and seconds (s). Default is ms. For example, latency:24ms returns traces whose overall latency is greater than or equal to 24 milliseconds.
  • label:LABEL_KEY: Return all traces containing the specified label key (exact match, case-sensitive) regardless of the key:value pair's value (including empty values).
  • LABEL_KEY:VALUE_PREFIX: Return all traces containing the specified label key (exact match, case-sensitive) whose value starts with VALUE_PREFIX. Both a key and a value must be specified.
  • +LABEL_KEY:VALUE: Return all traces containing a key:value pair exactly matching the specified text. Both a key and a value must be specified.
  • method:VALUE: Equivalent to /http/method:VALUE.
  • url:VALUE: Equivalent to /http/url:VALUE.
Returns
Type Description
string

setFilter

Optional. A filter against labels for the request.

By default, searches use prefix matching. To specify exact match, prepend a plus symbol (+) to the search term. Multiple terms are ANDed. Syntax:

  • root:NAME_PREFIX or NAME_PREFIX: Return traces where any root span starts with NAME_PREFIX.
  • +root:NAME or +NAME: Return traces where any root span's name is exactly NAME.
  • span:NAME_PREFIX: Return traces where any span starts with NAME_PREFIX.
  • +span:NAME: Return traces where any span's name is exactly NAME.
  • latency:DURATION: Return traces whose overall latency is greater or equal to than DURATION. Accepted units are nanoseconds (ns), milliseconds (ms), and seconds (s). Default is ms. For example, latency:24ms returns traces whose overall latency is greater than or equal to 24 milliseconds.
  • label:LABEL_KEY: Return all traces containing the specified label key (exact match, case-sensitive) regardless of the key:value pair's value (including empty values).
  • LABEL_KEY:VALUE_PREFIX: Return all traces containing the specified label key (exact match, case-sensitive) whose value starts with VALUE_PREFIX. Both a key and a value must be specified.
  • +LABEL_KEY:VALUE: Return all traces containing a key:value pair exactly matching the specified text. Both a key and a value must be specified.
  • method:VALUE: Equivalent to /http/method:VALUE.
  • url:VALUE: Equivalent to /http/url:VALUE.
Parameter
Name Description
var string
Returns
Type Description
$this

getOrderBy

Optional. Field used to sort the returned traces.

Can be one of the following:

  • trace_id
  • name (name field of root span in the trace)
  • duration (difference between end_time and start_time fields of the root span)
  • start (start_time field of the root span) Descending order can be specified by appending desc to the sort field (for example, name desc). Only one sort field is permitted.
Returns
Type Description
string

setOrderBy

Optional. Field used to sort the returned traces.

Can be one of the following:

  • trace_id
  • name (name field of root span in the trace)
  • duration (difference between end_time and start_time fields of the root span)
  • start (start_time field of the root span) Descending order can be specified by appending desc to the sort field (for example, name desc). Only one sort field is permitted.
Parameter
Name Description
var string
Returns
Type Description
$this

static::build

Parameter
Name Description
projectId string

Required. ID of the Cloud project where the trace data is stored.

Returns
Type Description
ListTracesRequest