public static class TraceLabels
Reference documentation and code samples for the Google.Cloud.Diagnostics.Common class TraceLabels.
A helper class to handle span labels.
Namespace
GoogleCloudGoogle.Cloud.DiagnosticsCommonAssembly
Google.Cloud.Diagnostics.Common.dll
Fields
Agent
public const string Agent = "/agent"
The label to denote an agent.
Field Value | |
---|---|
Type | Description |
string |
HttpHost
public const string HttpHost = "/http/host"
The label to denote the host.
Field Value | |
---|---|
Type | Description |
string |
HttpMethod
public const string HttpMethod = "/http/method"
The label to denote the request method.
Field Value | |
---|---|
Type | Description |
string |
HttpRequestSize
public const string HttpRequestSize = "/http/request/size"
The label to denote the size of a request.
Field Value | |
---|---|
Type | Description |
string |
HttpStatusCode
public const string HttpStatusCode = "/http/status_code"
The label to denote the response status code.
Field Value | |
---|---|
Type | Description |
string |
StackTrace
public const string StackTrace = "/stacktrace"
The label to denote a stack trace.
Field Value | |
---|---|
Type | Description |
string |
Methods
FromStackTrace(StackTrace)
public static Dictionary<string, string> FromStackTrace(StackTrace stackTrace)
Creates a a map of labels to represent a StackTrace for a span.
Parameter | |
---|---|
Name | Description |
stackTrace | StackTrace |
Returns | |
---|---|
Type | Description |
Dictionarystringstring |
GetAgentLabel()
public static Dictionary<string, string> GetAgentLabel()
Gets a map with the label for the agent which contains the agent's name and version.
Returns | |
---|---|
Type | Description |
Dictionarystringstring |