Share traces and spans

This document describes how you can share with another person or group the data you are viewing on the Trace Explorer page. For example, you might notice a data anomaly or a trend in your trace data and want another person to examine that data in more detail. Or, there might be errors or unexpected latency values in an individual trace or span that you want someone to investigate.

Best practice

To facilitate troubleshooting, we recommend that all people, groups and domains that might need to view trace data in a project be granted the Cloud Trace User role (roles/cloudtrace.user) on that project. This role gives principals the permissions they need to view trace data.

Before you begin

To get the permissions that you need to view trace data by using the Google Cloud console, ask your administrator to grant you the Cloud Trace User (roles/cloudtrace.user) IAM role on the projects that store your trace data. For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

Share trace data

When you use the Trace Explorer page to explore your trace data, the selections that you make update the URL in your browser. For example, if you add filters or set the time range, then the URL to the page is modified. Similarly, if you select a span or a trace, the URL is updated to include the span ID and trace ID.

Therefore, to share the data you are viewing with another person, copy the page URL and share it. When the recipient pastes the URL into their browser, the settings contained in the URL override any default settings for the Trace Explorer page. The displayed data depends on the recipient's IAM roles on the projects referenced by the URL.

To share trace data, do the following:

  1. In the Google Cloud console, go to the Trace explorer page:

    Go to Trace explorer

    You can also find this page by using the search bar.

  2. Configure the Trace Explorer page to show the data that you want to share.

    For example, you might want to add filters, update the time-range selector, or change the Scope element, which controls which projects are searched for trace data.

    If the first menu of the Scope element is set to Project or to _Default, then your project is searched for trace data. Otherwise, the projects listed in the trace scope are searched. For more information, see Create and manage trace scopes.

    If you want to share the URL for a trace or span, then open the Details flyout for that trace or span by doing one of the following:

    • In the toolbar, click Search for trace and then enter the trace ID.

    • Find and select a span.

  3. Copy the URL in your browser, and then share that URL.

Troubleshoot

For information about how to resolve problems like a trace missing spans or not seeing any data in the Trace Explorer page, see Troubleshoot.

What's next