trace_scopes
Creates, updates, deletes, gets or lists a trace_scopes
resource.
Overview
Name | trace_scopes |
Type | Resource |
Id | google.observability.trace_scopes |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the trace scope. For example: projects/my-project/locations/global/traceScopes/my-trace-scope |
createTime | string (google-datetime) | Output only. The creation timestamp of the trace scope. |
description | string | Optional. Describes this trace scope. The maximum length of the description is 8000 characters. |
resourceNames | array | Required. Names of the projects that are included in this trace scope. * projects/[PROJECT_ID] A trace scope can include a maximum of 20 projects. |
updateTime | string (google-datetime) | Output only. The last update timestamp of the trace scope. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the trace scope. For example: projects/my-project/locations/global/traceScopes/my-trace-scope |
createTime | string (google-datetime) | Output only. The creation timestamp of the trace scope. |
description | string | Optional. Describes this trace scope. The maximum length of the description is 8000 characters. |
resourceNames | array | Required. Names of the projects that are included in this trace scope. * projects/[PROJECT_ID] A trace scope can include a maximum of 20 projects. |
updateTime | string (google-datetime) | Output only. The last update timestamp of the trace scope. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , traceScopesId | Get TraceScope resource. | |
list | select | projectsId , locationsId | pageSize , pageToken | List TraceScopes of a project in a particular location. |
create | insert | projectsId , locationsId | traceScopeId | Create a new TraceScope. |
patch | update | projectsId , locationsId , traceScopesId | updateMask | Update a TraceScope. |
delete | delete | projectsId , locationsId , traceScopesId | Delete a TraceScope. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
traceScopesId | string | |
pageSize | integer (int32) | |
pageToken | string | |
traceScopeId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Get TraceScope resource.
SELECT
name,
createTime,
description,
resourceNames,
updateTime
FROM google.observability.trace_scopes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND traceScopesId = '{{ traceScopesId }}' -- required;
List TraceScopes of a project in a particular location.
SELECT
name,
createTime,
description,
resourceNames,
updateTime
FROM google.observability.trace_scopes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Create a new TraceScope.
INSERT INTO google.observability.trace_scopes (
data__name,
data__resourceNames,
data__description,
projectsId,
locationsId,
traceScopeId
)
SELECT
'{{ name }}',
'{{ resourceNames }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ traceScopeId }}'
RETURNING
name,
createTime,
description,
resourceNames,
updateTime
;
# Description fields are for documentation purposes
- name: trace_scopes
props:
- name: projectsId
value: string
description: Required parameter for the trace_scopes resource.
- name: locationsId
value: string
description: Required parameter for the trace_scopes resource.
- name: name
value: string
description: >
Identifier. The resource name of the trace scope. For example: projects/my-project/locations/global/traceScopes/my-trace-scope
- name: resourceNames
value: array
description: >
Required. Names of the projects that are included in this trace scope. * `projects/[PROJECT_ID]` A trace scope can include a maximum of 20 projects.
- name: description
value: string
description: >
Optional. Describes this trace scope. The maximum length of the description is 8000 characters.
- name: traceScopeId
value: string
UPDATE
examples
- patch
Update a TraceScope.
UPDATE google.observability.trace_scopes
SET
data__name = '{{ name }}',
data__resourceNames = '{{ resourceNames }}',
data__description = '{{ description }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND traceScopesId = '{{ traceScopesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
description,
resourceNames,
updateTime;
DELETE
examples
- delete
Delete a TraceScope.
DELETE FROM google.observability.trace_scopes
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND traceScopesId = '{{ traceScopesId }}' --required;