LanguageExt.SysX

LanguageExt.SysX SysX Diag

Contents

class Activity <RT> Source #

where RT : struct, HasActivitySource<RT>, HasCancel<RT>

An Activity has an operation name, an ID, a start time and duration, tags, and baggage.

Activities should be created by calling the span functions, configured as necessary. Each span function takes an Eff or Aff operation to run (which is the activity). The runtime system will maintain the parent- child relationships for the activities, and maintains the 'current' activity.

Parameters

type RT

runtime

Properties

property Eff<RT, Option<string>> traceState Source #

Read the trace-state string of the current activity

property Eff<RT, Option<ActivityTraceId>> traceId Source #

Read the trace ID of the current activity

property Eff<RT, HashMap<string, string?>> baggage Source #

Read the baggage of the current activity

property Eff<RT, HashMap<string, string?>> tags Source #

Read the tags of the current activity

property Eff<RT, HashMap<string, object?>> tagObjects Source #

Read the tags of the current activity

property Eff<RT, Option<ActivityContext>> context Source #

Read the context of the current activity

None if there is no current activity

property Eff<RT, Option<TimeSpan>> duration Source #

Read the duration of the current activity

None if there is no current activity

property Eff<RT, Seq<ActivityEvent>> events Source #

Read the events of the current activity

property Eff<RT, Option<string>> id Source #

Read the ID of the current activity

None if there is no current activity

property Eff<RT, Option<ActivityKind>> kind Source #

Read the kind of the current activity

None if there is no current activity

property Eff<RT, Seq<ActivityLink>> links Source #

Read the links of the current activity

property Eff<RT, Option<Activity>> current Source #

Read the current activity

None if there is no current activity

property Eff<RT, Option<string>> parentId Source #

Read the parent ID of the current activity

None if there is no current activity

property Eff<RT, Option<ActivitySpanId>> parentSpanId Source #

Read the parent span ID of the current activity

None if there is no current activity

property Eff<RT, Option<bool>> recorded Source #

Read the recorded flag of the current activity

None if there is no current activity

property Eff<RT, Option<string>> displayName Source #

Read the display-name of the current activity

None if there is no current activity

property Eff<RT, Option<string>> operationName Source #

Read the operation-name of the current activity

None if there is no current activity

property Eff<RT, Option<string>> rootId Source #

Read the root ID of the current activity

None if there is no current activity

property Eff<RT, Option<ActivitySpanId>> spanId Source #

Read the span ID of the current activity

None if there is no current activity

property Eff<RT, Option<DateTime>> startTimeUTC Source #

Read the start-time of the current activity

None if there is no current activity

Methods

method Eff<RT, A> span <A> (string name, Eff<RT, A> operation) Source #

Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.

Parameters

param name

The operation name of the activity.

param operation

The operation to whose activity will be traced

returns

The result of the operation

method Eff<RT, A> span <A> ( string name, ActivityKind activityKind, Eff<RT, A> operation) Source #

Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.

Parameters

param name

The operation name of the activity.

param activityKind

The activity kind.

param operation

The operation to whose activity will be traced

returns

The result of the operation

method Eff<RT, A> span <A> ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, Eff<RT, A> operation) Source #

Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.

Parameters

param name

The operation name of the activity.

param activityKind

The activity kind.

param activityTags

The optional tags list to initialise the created activity object with.

param operation

The operation to whose activity will be traced

returns

The result of the operation

method Eff<RT, TA> span <TA> ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, Eff<RT, TA> operation) Source #

Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.

Parameters

param name

The operation name of the activity.

param activityKind

The activity kind.

param activityTags

The optional tags list to initialise the created activity object with.

param activityLinks

The optional ActivityLink list to initialise the created activity object with.

param startTime

The optional start timestamp to set on the created activity object.

param operation

The operation to whose activity will be traced

returns

The result of the operation

method Eff<RT, A> span <A> ( string name, ActivityKind activityKind, ActivityContext parentContext, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, Eff<RT, A> operation) Source #

Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.

Parameters

param name

The operation name of the activity.

param activityKind

The activity kind.

param parentContext

The parent ActivityContext object to initialize the created activity object with

param activityTags

The optional tags list to initialise the created activity object with.

param activityLinks

The optional ActivityLink list to initialise the created activity object with.

param startTime

The optional start timestamp to set on the created activity object.

param operation

The operation to whose activity will be traced

returns

The result of the operation

method Aff<RT, A> span <A> (string name, Aff<RT, A> operation) Source #

Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.

Parameters

param name

The operation name of the activity.

param operation

The operation to whose activity will be traced

returns

The result of the operation

method Aff<RT, A> span <A> ( string name, ActivityKind activityKind, Aff<RT, A> operation) Source #

Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.

Parameters

param name

The operation name of the activity.

param activityKind

The activity kind.

param operation

The operation to whose activity will be traced

returns

The result of the operation

method Aff<RT, A> span <A> ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, Aff<RT, A> operation) Source #

Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.

Parameters

param name

The operation name of the activity.

param activityKind

The activity kind.

param activityTags

The optional tags list to initialise the created activity object with.

param operation

The operation to whose activity will be traced

returns

The result of the operation

method Aff<RT, A> span <A> ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, Aff<RT, A> operation) Source #

Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.

Parameters

param name

The operation name of the activity.

param activityKind

The activity kind.

param activityTags

The optional tags list to initialise the created activity object with.

param activityLinks

The optional ActivityLink list to initialise the created activity object with.

param startTime

The optional start timestamp to set on the created activity object.

param operation

The operation to whose activity will be traced

returns

The result of the operation

method Aff<RT, A> span <A> ( string name, ActivityKind activityKind, ActivityContext parentContext, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, Aff<RT, A> operation) Source #

Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.

Parameters

param name

The operation name of the activity.

param activityKind

The activity kind.

param parentContext

The parent ActivityContext object to initialize the created activity object with

param activityTags

The optional tags list to initialise the created activity object with.

param activityLinks

The optional ActivityLink list to initialise the created activity object with.

param startTime

The optional start timestamp to set on the created activity object.

param operation

The operation to whose activity will be traced

returns

The result of the operation

method Eff<RT, Unit> setTraceState (string traceStateString) Source #

Set the state trace string

Parameters

param traceStateString

Trace state string

returns

Unit effect

method Eff<RT, Unit> addBaggage (string key, string? value) Source #

Add baggage to the current activity

Parameters

param key

Baggage key

param value

Baggage value

returns

Unit effect

method Eff<RT, Unit> addTag (string name, string? value) Source #

Add tag to the current activity

Parameters

param name

Tag name

param value

Tag value

returns

Unit effect

method Eff<RT, Unit> addTag (string name, object? value) Source #

Add tag to the current activity

Parameters

param name

Tag name

param value

Tag value

method Eff<RT, Unit> addEvent (ActivityEvent @event) Source #

Add an event to the current activity

Parameters

param @event

Event