Google.Cloud.Diagnostics.Common - Class TraceLabels (5.1.0)

public static class TraceLabels

Reference documentation and code samples for the Google.Cloud.Diagnostics.Common class TraceLabels.

A helper class to handle span labels.

Inheritance

object > TraceLabels

Namespace

GoogleCloudGoogle.Cloud.DiagnosticsCommon

Assembly

Google.Cloud.Diagnostics.Common.dll

Fields

Agent

public const string Agent = "/agent"

The label to denote an agent.

Field Value
TypeDescription
string

HttpHost

public const string HttpHost = "/http/host"

The label to denote the host.

Field Value
TypeDescription
string

HttpMethod

public const string HttpMethod = "/http/method"

The label to denote the request method.

Field Value
TypeDescription
string

HttpRequestSize

public const string HttpRequestSize = "/http/request/size"

The label to denote the size of a request.

Field Value
TypeDescription
string

HttpStatusCode

public const string HttpStatusCode = "/http/status_code"

The label to denote the response status code.

Field Value
TypeDescription
string

StackTrace

public const string StackTrace = "/stacktrace"

The label to denote a stack trace.

Field Value
TypeDescription
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
NameDescription
stackTraceStackTrace
Returns
TypeDescription
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
TypeDescription
Dictionarystringstring