[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-19。"],[],[],null,["# Share traces and spans\n\nThis document describes how you can share with another person or group the\ndata you are viewing on the **Trace Explorer** page. For example,\nyou might notice a data anomaly or a trend in your trace data and want another\nperson to examine that data in more detail. Or, there might be errors or\nunexpected latency values in an individual trace or span that you\nwant someone to investigate.\n\nThis feature is supported only for Google Cloud projects.\nFor [App Hub](/app-hub/docs/overview)\nconfigurations, select the App Hub host project or\nthe app-enabled folder's management project.\n\nBest practice\n-------------\n\nTo facilitate troubleshooting, we recommend that all people, groups and domains\nthat might need to view trace data in a project be granted the\n[Cloud Trace User role (`roles/cloudtrace.user`)](/iam/docs/understanding-roles#cloudtrace.user) on that\nproject. This role gives principals the permissions they need to view\ntrace data.\n\nBefore you begin\n----------------\n\n\nTo get the permissions that\nyou need to view trace data by using the Google Cloud console,\n\nask your administrator to grant you the\n\n\n[Cloud Trace User](/iam/docs/roles-permissions/cloudtrace#cloudtrace.user) (`roles/cloudtrace.user`)\nIAM role on the projects that store your trace data.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nShare trace data\n----------------\n\nWhen you use the **Trace Explorer** page to explore your trace data,\nthe selections that you make update the URL in your browser. For example, if\nyou add filters or set the time range, then the URL to the page is modified.\nSimilarly, if you select a span or a trace, the URL is updated to include\nthe span ID and trace ID.\n\nTherefore, to share the data you are viewing with another person, copy the\npage URL and share it. When the recipient pastes the URL into\ntheir browser, the settings contained in the URL override any default settings\nfor the **Trace Explorer** page. The displayed data depends on the\nrecipient's IAM roles on the projects referenced by the URL.\n\nTo share trace data, do the following:\n\n1. In the Google Cloud console, go to the **Trace explorer** page:\n\n [Go to **Trace explorer**](https://console.cloud.google.com/traces/explorer)\n\n \u003cbr /\u003e\n\n You can also find this page by using the search bar.\n2. In the toolbar of the Google Cloud console, select your Google Cloud project. For [App Hub](/app-hub/docs/overview) configurations, select the App Hub host project or the app-enabled folder's management project.\n3. Configure the **Trace Explorer** page to show the data that you\n want to share.\n\n For example, you might want to add filters, update the time-range selector,\n or change the **Scope** element, which controls which projects are searched\n for trace data.\n\n If the first menu of the **Scope** element is set to\n **Project** or to **_Default** , then\n your project is searched for trace data. Otherwise, the projects listed in\n the trace scope are searched. For more information, see\n [Create and manage trace scopes](/trace/docs/trace-scope/create-and-manage).\n\n If you want to share the URL for a trace or span,\n then open the **Details** flyout for\n that trace or span by doing one of the following:\n - In the toolbar, click *pageview* **Search for trace**\n and then enter the trace ID.\n\n - Find and select a span.\n\n4. Copy the URL in your browser, and then share that URL.\n\nTroubleshoot\n------------\n\nFor information about how to resolve problems like a trace missing spans\nor not seeing any data in the **Trace Explorer** page, see\n[Troubleshoot](/trace/docs/troubleshooting).\n\nWhat's next\n-----------\n\n- [Find and explore traces](/trace/docs/finding-traces)\n- [Create and manage trace scopes](/trace/docs/trace-scope/create-and-manage)\n- [View traces across projects](/trace/docs/cross-project-traces)\n- [Troubleshoot](/trace/docs/troubleshooting)"]]