Method: projects.traceSinks.create

Creates a sink that exports trace spans to a destination. The export of newly-ingested traces begins immediately, unless the sink's writerIdentity is not permitted to write to the destination. A sink can export traces only from the resource owning the sink (the 'parent').

HTTP request

POST https://cloudtrace.googleapis.com/v2beta1/{parent=projects/*}/traceSinks

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
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 permission on the specified resource parent:

  • cloudtrace.tracesinks.create

Request body

The request body contains an instance of TraceSink .

Response body

If successful, the response body contains a newly created instance of TraceSink .

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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年07月23日 UTC.