[[["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\u003eTraceLabels\u003c/code\u003e class in the \u003ccode\u003eGoogle.Cloud.Diagnostics.Common\u003c/code\u003e namespace is a helper for managing span labels within Google Cloud Diagnostics.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides constant string fields for common labels like \u003ccode\u003e/agent\u003c/code\u003e, \u003ccode\u003e/http/host\u003c/code\u003e, \u003ccode\u003e/http/method\u003c/code\u003e, \u003ccode\u003e/http/request/size\u003c/code\u003e, \u003ccode\u003e/http/status_code\u003c/code\u003e, and \u003ccode\u003e/stacktrace\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt contains the method \u003ccode\u003eFromStackTrace\u003c/code\u003e to create a map of labels to represent a \u003ccode\u003eStackTrace\u003c/code\u003e for a span.\u003c/p\u003e\n"],["\u003cp\u003eIt contains the method \u003ccode\u003eGetAgentLabel\u003c/code\u003e that returns a map containing the agent's name and version.\u003c/p\u003e\n"]]],[],null,["# Google.Cloud.Diagnostics.Common - Class TraceLabels (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.TraceLabels)\n- [5.2.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.2.0/Google.Cloud.Diagnostics.Common.TraceLabels)\n- [5.1.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.1.0/Google.Cloud.Diagnostics.Common.TraceLabels)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.0.0/Google.Cloud.Diagnostics.Common.TraceLabels)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.4.0/Google.Cloud.Diagnostics.Common.TraceLabels)\n- [4.3.1](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.3.1/Google.Cloud.Diagnostics.Common.TraceLabels) \n\n public static class TraceLabels\n\nReference documentation and code samples for the Google.Cloud.Diagnostics.Common class TraceLabels.\n\nA helper class to handle span labels. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e TraceLabels \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.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \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\nFields\n------\n\n### Agent\n\n public const string Agent = \"/agent\"\n\nThe label to denote an agent.\n\n### HttpHost\n\n public const string HttpHost = \"/http/host\"\n\nThe label to denote the host.\n\n### HttpMethod\n\n public const string HttpMethod = \"/http/method\"\n\nThe label to denote the request method.\n\n### HttpRequestSize\n\n public const string HttpRequestSize = \"/http/request/size\"\n\nThe label to denote the size of a request.\n\n### HttpStatusCode\n\n public const string HttpStatusCode = \"/http/status_code\"\n\nThe label to denote the response status code.\n\n### StackTrace\n\n public const string StackTrace = \"/stacktrace\"\n\nThe label to denote a stack trace.\n\nMethods\n-------\n\n### FromStackTrace(StackTrace)\n\n public static Dictionary\u003cstring, string\u003e FromStackTrace(StackTrace stackTrace)\n\nCreates a a map of labels to represent a [StackTrace](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.TraceLabels#Google_Cloud_Diagnostics_Common_TraceLabels_StackTrace) for a span.\n\n### GetAgentLabel()\n\n public static Dictionary\u003cstring, string\u003e GetAgentLabel()\n\nGets a map with the label for the agent which contains the agent's name and version."]]