[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eTraceTarget\u003c/code\u003e class in the \u003ccode\u003eGoogle.Cloud.Diagnostics.Common\u003c/code\u003e namespace represents the destination for sending trace data, specifically supporting Google Cloud Platform (GCP) projects.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of \u003ccode\u003eTraceTarget\u003c/code\u003e is 5.2.0, with prior versions ranging from 5.1.0 to 4.3.1 also available in the documentation.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTraceTarget\u003c/code\u003e utilizes the \u003ccode\u003eForProject\u003c/code\u003e method to generate a \u003ccode\u003eTraceTarget\u003c/code\u003e instance for directing trace entries to a specified GCP project, identified by the \u003ccode\u003eprojectId\u003c/code\u003e string.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGetFullTraceName\u003c/code\u003e method is used to retrieve the complete name of a trace, using the \u003ccode\u003etraceId\u003c/code\u003e, which corresponds with the LogEntry format outlined in Google Cloud documentation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTraceTarget\u003c/code\u003e class has a \u003ccode\u003eProjectId\u003c/code\u003e property that allows you to retrieve the associated Google Cloud Platform project ID.\u003c/p\u003e\n"]]],[],null,["# Google.Cloud.Diagnostics.Common - Class TraceTarget (5.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [5.3.0 (latest)](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.TraceTarget)\n- [5.2.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.2.0/Google.Cloud.Diagnostics.Common.TraceTarget)\n- [5.1.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.1.0/Google.Cloud.Diagnostics.Common.TraceTarget)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.0.0/Google.Cloud.Diagnostics.Common.TraceTarget)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.4.0/Google.Cloud.Diagnostics.Common.TraceTarget)\n- [4.3.1](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.3.1/Google.Cloud.Diagnostics.Common.TraceTarget) \n\n public sealed class TraceTarget\n\nReference documentation and code samples for the Google.Cloud.Diagnostics.Common class TraceTarget.\n\nRepresents the location traces will be sent to. The Trace API only supports projects. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e TraceTarget \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Diagnostics.Common](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common)\n\nAssembly\n--------\n\nGoogle.Cloud.Diagnostics.Common.dll\n\nProperties\n----------\n\n### ProjectId\n\n public string ProjectId { get; }\n\nThe Google Cloud Platform project Id.\n\nMethods\n-------\n\n### ForProject(string)\n\n public static TraceTarget ForProject(string projectId)\n\nCreates a [TraceTarget](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.TraceTarget) instance for sending trace entries to a GCP project.\n\n### GetFullTraceName(string)\n\n public string GetFullTraceName(string traceId)\n\nGets the full trace name.\nSee: \u003chttps://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry\u003e"]]