You can use Identity and Access Management (IAM) roles to grant granular permissions for viewing, writing, or managing Cloud Trace resources and preventing unauthorized access to trace data.
- For information about granting IAM roles to a user or service account, see Manage access to projects, folders, and organizations.
- For information about predefined roles, see IAM: Roles and permissions.
- For help choosing the most appropriate predefined roles, see Choose predefined roles.
Best practice
To facilitate troubleshooting, grant the
Cloud Trace User role (roles/cloudtrace.user) to
all people, groups, and domains that need to view trace data in a project.
This role gives principals the permissions they need to view trace data.
Permissions and predefined roles
IAM roles include permissions and can be assigned to users, groups, and service accounts.
Cloud Trace roles
The following table lists the predefined roles for Cloud Trace, and it lists the permissions for those roles:
| Role | Permissions |
|---|---|
Cloud Trace Admin( Provides full access to the Trace console and read-write access to traces. Lowest-level resources where you can grant this role:
|
|
Cloud Trace User( Provides full access to the Trace console and read access to traces. Lowest-level resources where you can grant this role:
|
|
Cloud Trace Agent( For service accounts. Provides ability to write traces by sending the data to Stackdriver Trace. Lowest-level resources where you can grant this role:
|
|
Telemetry API roles
The following table lists the predefined roles for the Telemetry (OTLP) API, and it lists the permissions for those roles:
| Role | Permissions |
|---|---|
Telemetry Admin( Admin role for telemetry |
|
Telemetry Editor( Editor role for telemetry |
|
Consumer Admin Beta( Grants permission management access to consumer resources. |
|
Cloud Telemetry Logs Writer Beta( Access to write logs. |
|
Cloud Telemetry Metrics Writer( Access to write metrics. |
|
Integrated Service Telemetry Logs Writer Beta( |