Show / Hide Table of Contents

Class TraceLabels

A helper class to handle span labels.

Inheritance
System.Object
TraceLabels
Inherited Members
System.Object.ToString()
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Cloud.Diagnostics.Common
Assembly: Google.Cloud.Diagnostics.Common.dll
Syntax
public static class TraceLabels

Fields

Agent

The label to denote an agent.

Declaration
public const string Agent = "/agent"
Field Value
Type Description
System.String

HttpHost

The label to denote the host.

Declaration
public const string HttpHost = "/http/host"
Field Value
Type Description
System.String

HttpMethod

The label to denote the request method.

Declaration
public const string HttpMethod = "/http/method"
Field Value
Type Description
System.String

HttpRequestSize

The label to denote the size of a request.

Declaration
public const string HttpRequestSize = "/http/request/size"
Field Value
Type Description
System.String

HttpStatusCode

The label to denote the response status code.

Declaration
public const string HttpStatusCode = "/http/status_code"
Field Value
Type Description
System.String

StackTrace

The label to denote a stack trace.

Declaration
public const string StackTrace = "/stacktrace"
Field Value
Type Description
System.String

Methods

FromStackTrace(StackTrace)

Creates a a map of labels to represent a StackTrace for a span.

Declaration
public static Dictionary<string, string> FromStackTrace(StackTrace stackTrace)
Parameters
Type Name Description
System.Diagnostics.StackTrace stackTrace
Returns
Type Description
System.Collections.Generic.Dictionary<System.String, System.String>

GetAgentLabel()

Gets a map with the label for the agent which contains the agent's name and version.

Declaration
public static Dictionary<string, string> GetAgentLabel()
Returns
Type Description
System.Collections.Generic.Dictionary<System.String, System.String>
Back to top