Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Diagnostics.Activity Class Reference

Classes

class  BaggageLinkedList
 
class  TagsLinkedList
 

Public Member Functions

Activity SetStatus (ActivityStatusCode code, string? description=null)
 
stringGetBaggageItem (string key)
 
object? GetTagItem (string key)
 
 Activity (string operationName)
 
Activity AddTag (string key, string? value)
 
Activity AddTag (string key, object? value)
 
Activity SetTag (string key, object? value)
 
Activity AddEvent (ActivityEvent e)
 
Activity AddBaggage (string key, string? value)
 
Activity SetBaggage (string key, string? value)
 
Activity SetParentId (string parentId)
 
Activity SetParentId (ActivityTraceId traceId, ActivitySpanId spanId, ActivityTraceFlags activityTraceFlags=ActivityTraceFlags.None)
 
Activity SetStartTime (DateTime startTimeUtc)
 
Activity SetEndTime (DateTime endTimeUtc)
 
Activity Start ()
 
void Stop ()
 
Activity SetIdFormat (ActivityIdFormat format)
 
void Dispose ()
 
void SetCustomProperty (string propertyName, object? propertyValue)
 
object? GetCustomProperty (string propertyName)
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Static Package Functions

static bool TryConvertIdToContext (string traceParent, string traceState, out ActivityContext context)
 
static Activity Create (ActivitySource source, string name, ActivityKind kind, string parentId, ActivityContext parentContext, IEnumerable< KeyValuePair< string, object > > tags, IEnumerable< ActivityLink > links, DateTimeOffset startTime, ActivityTagsCollection samplerTags, ActivitySamplingResult request, bool startIt, ActivityIdFormat idFormat)
 
static DateTime GetUtcNow ()
 

Properties

static bool ForceDefaultIdFormat [get, set]
 
ActivityStatusCode Status [get]
 
stringStatusDescription [get]
 
ActivityKind Kind [get, private set]
 
string OperationName [get]
 
string DisplayName [get, set]
 
ActivitySource Source [get, private set]
 
ActivityParent [get, private set]
 
TimeSpan Duration [get, private set]
 
DateTime StartTimeUtc [get, private set]
 
stringId [get]
 
stringParentId [get]
 
stringRootId [get]
 
IEnumerable< KeyValuePair< string, string?> > Tags [get]
 
IEnumerable< KeyValuePair< string, object?> > TagObjects [get]
 
IEnumerable< ActivityEventEvents [get]
 
IEnumerable< ActivityLinkLinks [get]
 
IEnumerable< KeyValuePair< string, string?> > Baggage [get]
 
ActivityContext Context [get]
 
stringTraceStateString [get, set]
 
ActivitySpanId SpanId [get]
 
ActivityTraceId TraceId [get]
 
bool Recorded [get]
 
bool IsAllDataRequested [get, set]
 
ActivityTraceFlags ActivityTraceFlags [get, set]
 
ActivitySpanId ParentSpanId [get]
 
static ? Func< ActivityTraceIdTraceIdGenerator [get, set]
 
static ActivityIdFormat DefaultIdFormat [get, set]
 
bool W3CIdFlagsSet [get]
 
bool IsFinished [get, set]
 
ActivityIdFormat IdFormat [get, private set]
 
static ? Activity Current [get, set]
 

Private Types

enum  State : byte {
  None = 0 , FormatUnknown = 0 , FormatHierarchical = 1 , FormatW3C = 2 ,
  FormatFlags = 3 , IsFinished = 0x80
}
 

Private Member Functions

void GenerateW3CId ()
 
string GenerateHierarchicalId ()
 
string GetRootId (string id)
 
string AppendSuffix (string parentId, string suffix, char delimiter)
 
bool TrySetTraceIdFromParent ()
 
void TrySetTraceFlagsFromParent ()
 

Static Private Member Functions

static bool IsW3CId (string id)
 
static void NotifyError (Exception exception)
 
static unsafe long GetRandomNumber ()
 
static bool ValidateSetCurrent (Activity activity)
 
static void SetCurrent (Activity activity)
 
static string GenerateRootId ()
 

Private Attributes

string _traceState
 
State _state
 
int _currentChildId
 
string _id
 
string _rootId
 
string _parentId
 
string _parentSpanId
 
string _traceId
 
string _spanId
 
byte _w3CIdFlags
 
byte _parentTraceFlags
 
TagsLinkedList _tags
 
BaggageLinkedList _baggage
 
DiagLinkedList< ActivityLink_links
 
DiagLinkedList< ActivityEvent_events
 
Dictionary< string, object > _customProperties
 
string _displayName
 
ActivityStatusCode _statusCode
 
string _statusDescription
 
Activity _previousActiveActivity
 

Static Private Attributes

static readonly IEnumerable< KeyValuePair< string, string > > s_emptyBaggageTags = new KeyValuePair<string, string>[0]
 
static readonly IEnumerable< KeyValuePair< string, object > > s_emptyTagObjects = new KeyValuePair<string, object>[0]
 
static readonly IEnumerable< ActivityLinks_emptyLinks = new ActivityLink[0]
 
static readonly IEnumerable< ActivityEvents_emptyEvents = new ActivityEvent[0]
 
static readonly ActivitySource s_defaultSource = new ActivitySource(string.Empty)
 
static readonly string s_uniqSuffix = "-" + GetRandomNumber().ToString("x") + "."
 
static long s_currentRootId = (uint)GetRandomNumber()
 
static ActivityIdFormat s_defaultIdFormat
 
static readonly AsyncLocal< Activitys_current = new AsyncLocal<Activity>()
 

Detailed Description

Definition at line 8 of file Activity.cs.


The documentation for this class was generated from the following file: