# Package google.devtools.cloudtrace.v2beta1

## Index

- `https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.TracingConfigService` (interface)
- `https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.CreateTraceSinkRequest` (message)
- `https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.DeleteTraceSinkRequest` (message)
- `https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.GetTraceSinkRequest` (message)
- `https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.ListTraceSinksRequest` (message)
- `https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.ListTraceSinksResponse` (message)
- `https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.OutputConfig` (message)
- `https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.TraceSink` (message)
- `https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.UpdateTraceSinkRequest` (message)

## TracingConfigService

Service for configuring sinks used to export trace data out of Cloud Trace. This API may be extended in the future to cover a greater range of Trace related configuration.

| CreateTraceSink |
|---|
| `` rpc CreateTraceSink(`https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.CreateTraceSinkRequest`) returns (`https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.TraceSink`) `` Creates a sink that exports trace spans to a destination. The export of newly-ingested traces begins immediately, unless the sink's `writer_identity` is not permitted to write to the destination. A sink can export traces only from the resource owning the sink (the 'parent'). Authorization scopes :   Requires one of the following OAuth scopes: - `https://www.googleapis.com/auth/trace.append` - ` https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| DeleteTraceSink |
|---|
| `` rpc DeleteTraceSink(`https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.DeleteTraceSinkRequest`) returns (`https://protobuf.dev/reference/protobuf/google.protobuf#empty`) `` Deletes a sink. Authorization scopes :   Requires one of the following OAuth scopes: - `https://www.googleapis.com/auth/trace.append` - ` https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| GetTraceSink |
|---|
| `` rpc GetTraceSink(`https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.GetTraceSinkRequest`) returns (`https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.TraceSink`) `` Get a trace sink by name under the parent resource (GCP project). Authorization scopes :   Requires one of the following OAuth scopes: - `https://www.googleapis.com/auth/trace.readonly` - ` https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| ListTraceSinks |
|---|
| `` rpc ListTraceSinks(`https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.ListTraceSinksRequest`) returns (`https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.ListTraceSinksResponse`) `` List all sinks for the parent resource (GCP project). Authorization scopes :   Requires one of the following OAuth scopes: - `https://www.googleapis.com/auth/trace.readonly` - ` https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| UpdateTraceSink |
|---|
| `` rpc UpdateTraceSink(`https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.UpdateTraceSinkRequest`) returns (`https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.TraceSink`) `` Updates a sink. This method updates fields in the existing sink according to the provided update mask. The sink's name cannot be changed nor any output-only fields (e.g. the writer_identity). Authorization scopes :   Requires one of the following OAuth scopes: - `https://www.googleapis.com/auth/trace.append` - ` https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

## CreateTraceSinkRequest

The parameters to `CreateTraceSink`. With a parent "projects/my-trace-project" and TraceSink with a name "my-sink" this request will create the sink "projects/my-trace-project/sinks/my-sink"

| Fields ||
|---|---|
| `parent` | `string` Required. The resource in which to create the sink (currently only project sinks are supported): "projects/[PROJECT_ID]" Examples: `"projects/my-trace-project"`, `"projects/123456789"`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `cloudtrace.tracesinks.create` |
| `trace_sink` | `https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.TraceSink` Required. The new sink, whose `name` parameter is a sink identifier that is not already in use. |

## DeleteTraceSinkRequest

The parameters to `DeleteTraceSink`.

| Fields ||
|---|---|
| `name` | `string` Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]" Example: `"projects/12345/traceSinks/my-sink-id"`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudtrace.tracesinks.delete` |

## GetTraceSinkRequest

The parameters to `GetTraceSink`.

| Fields ||
|---|---|
| `name` | `string` Required. The resource name of the sink: "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]" Example: `"projects/12345/traceSinks/my-sink-id"`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudtrace.tracesinks.get` |

## ListTraceSinksRequest

The parameters to `ListTraceSinks`.

| Fields ||
|---|---|
| `parent` | `string` Required. The parent resource whose sinks are to be listed (currently only project parent resources are supported): "projects/[PROJECT_ID]" Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `cloudtrace.tracesinks.list` |
| `page_token` | `string` Optional. If present, then retrieve the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters should be identical to those in the previous call. |
| `page_size` | `int32` Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `next_page_token` in the response indicates that more results might be available. |

## ListTraceSinksResponse

Result returned from `ListTraceSinks`.

| Fields ||
|---|---|
| `sinks[]` | `https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.TraceSink` A list of sinks. |
| `next_page_token` | `string` A paginated response where more pages might be available has `next_page_token` set. To get the next set of results, call the same method again using the value of `next_page_token` as `page_token`. |

## OutputConfig

OutputConfig contains a destination for writing trace data.

| Fields ||
|---|---|
| `destination` | `string` Required. The destination for writing trace data. Supported formats include: "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" |

## TraceSink

Describes a sink used to export traces to a BigQuery dataset. The sink must be created within a project.

| Fields ||
|---|---|
| `name` | `string` Identifier. The canonical sink resource name, unique within the project. Must be of the form: projects/\[PROJECT_NUMBER\]/traceSinks/\[SINK_ID\]. E.g.: `"projects/12345/traceSinks/my-project-trace-sink"`. Sink identifiers are limited to 256 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods. |
| `output_config` | `https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.OutputConfig` Required. The export destination. |
| `writer_identity` | `string` Output only. A service account name for exporting the data. This field is set by sinks.create and sinks.update. The service account will need to be granted write access to the destination specified in the output configuration, see [Granting access for a resource](https://docs.cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). To create tables and to write data, this account needs the `dataEditor` role. Read more about roles in the [BigQuery documentation](https://cloud.google.com/bigquery/docs/access-control). E.g.: "service-00000001@00000002.iam.gserviceaccount.com" |

## UpdateTraceSinkRequest

The parameters to `UpdateTraceSink`.

| Fields ||
|---|---|
| `name` | `string` Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]" Example: `"projects/12345/traceSinks/my-sink-id"`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudtrace.tracesinks.update` |
| `trace_sink` | `https://docs.cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2beta1#google.devtools.cloudtrace.v2beta1.TraceSink` Required. The updated trace sink, whose name is the same identifier (`SINK_ID`) that appears as part of `name`. |
| `update_mask` | `https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` Required. Field mask that specifies the fields in `trace_sink` that are to be updated. A sink field is overwritten if, and only if, it is in the update mask. `name` and `writer_identity` fields cannot be updated. An empty `update_mask` is considered an error. For a detailed `FieldMask` definition, see <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask> Example: `updateMask=output_config`. |