- Activity <M, RT>
- currentActivity
- startActivity ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, ActivityContext? parentContext = default)
- span <A> (string name, K<M, A> operation)
- span <A> ( string name, ActivityKind activityKind, K<M, A> operation)
- span <A> ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, K<M, A> operation)
- span <TA> ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, K<M, TA> operation)
- span <A> ( string name, ActivityKind activityKind, ActivityContext parentContext, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, K<M, A> operation)
- setTraceState (string traceStateString)
- traceState
- traceId
- addBaggage (string key, string? value)
- baggage
- addTag (string name, string? value)
- addTag (string name, object? value)
- tags
- tagObjects
- context
- duration
- addEvent (ActivityEvent @event)
- events
- id
- kind
- links
- current
- parentId
- parentSpanId
- recorded
- displayName
- operationName
- rootId
- spanId
- startTimeUTC
- Activity <RT>
- startActivity ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, ActivityContext? parentContext = default)
- span <A> (string name, K<Eff<RT>, A> operation)
- span <A> ( string name, ActivityKind activityKind, K<Eff<RT>, A> operation)
- span <A> ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, K<Eff<RT>, A> operation)
- span <TA> ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, K<Eff<RT>, TA> operation)
- span <A> ( string name, ActivityKind activityKind, ActivityContext parentContext, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, K<Eff<RT>, A> operation)
- setTraceState (string traceStateString)
- traceState
- traceId
- addBaggage (string key, string? value)
- baggage
- addTag (string name, string? value)
- addTag (string name, object? value)
- tags
- tagObjects
- context
- duration
- addEvent (ActivityEvent @event)
- events
- id
- kind
- links
- current
- parentId
- parentSpanId
- recorded
- displayName
- operationName
- rootId
- spanId
- startTimeUTC
class Activity <M, RT> Source #
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.
type | M | Monad trait |
type | RT | Runtime |
property K<M, Activity?> currentActivity Source #
property K<M, Option<string>> traceState Source #
Read the trace-state string of the current activity
property K<M, HashMap<string, object?>> tagObjects Source #
Read the tags of the current activity
property K<M, Option<ActivityContext>> context Source #
Read the context of the current activity
None if there is no current activity
property K<M, Option<TimeSpan>> duration Source #
Read the duration of the current activity
None if there is no current activity
property K<M, Option<string>> id Source #
Read the ID of the current activity
None if there is no current activity
property K<M, Option<ActivityKind>> kind Source #
Read the kind of the current activity
None if there is no current activity
property K<M, Option<Activity>> current Source #
Read the current activity
None if there is no current activity
property K<M, Option<string>> parentId Source #
Read the parent ID of the current activity
None if there is no current activity
property K<M, Option<ActivitySpanId>> parentSpanId Source #
Read the parent span ID of the current activity
None if there is no current activity
property K<M, Option<bool>> recorded Source #
Read the recorded flag of the current activity
None if there is no current activity
property K<M, Option<string>> displayName Source #
Read the display-name of the current activity
None if there is no current activity
property K<M, Option<string>> operationName Source #
Read the operation-name of the current activity
None if there is no current activity
property K<M, Option<string>> rootId Source #
Read the root ID of the current activity
None if there is no current activity
property K<M, Option<ActivitySpanId>> spanId Source #
Read the span ID of the current activity
None if there is no current activity
property K<M, Option<DateTime>> startTimeUTC Source #
Read the start-time of the current activity
None if there is no current activity
method K<M, Activity> startActivity ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, ActivityContext? parentContext = default) Source #
method K<M, A> span <A> (string name, K<M, 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.
param | name | The operation name of the activity. |
param | operation | The operation to whose activity will be traced |
returns | The result of the |
method K<M, A> span <A> ( string name, ActivityKind activityKind, K<M, 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.
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 |
method K<M, A> span <A> ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, K<M, 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.
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 |
method K<M, TA> span <TA> ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, K<M, 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.
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 |
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 |
method K<M, A> span <A> ( string name, ActivityKind activityKind, ActivityContext parentContext, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, K<M, 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.
param | name | The operation name of the activity. |
param | activityKind | The activity kind. |
param | parentContext | The parent |
param | activityTags | The optional tags list to initialise the created activity object with. |
param | activityLinks | The optional |
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 |
method K<M, Unit> setTraceState (string traceStateString) Source #
Set the state trace string
param | traceStateString | Trace state string |
returns | Unit effect |
method K<M, Unit> addBaggage (string key, string? value) Source #
Add baggage to the current activity
param | key | Baggage key |
param | value | Baggage value |
returns | Unit effect |
method K<M, Unit> addTag (string name, string? value) Source #
Add tag to the current activity
param | name | Tag name |
param | value | Tag value |
returns | Unit effect |
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.
type | RT | Runtime |
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, 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, 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, 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
method Eff<RT, Activity> startActivity ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, ActivityContext? parentContext = default) Source #
method Eff<RT, A> span <A> (string name, K<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.
param | name | The operation name of the activity. |
param | operation | The operation to whose activity will be traced |
returns | The result of the |
method Eff<RT, A> span <A> ( string name, ActivityKind activityKind, K<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.
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 |
method Eff<RT, A> span <A> ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, K<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.
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 |
method Eff<RT, TA> span <TA> ( string name, ActivityKind activityKind, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, K<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.
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 |
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 |
method Eff<RT, A> span <A> ( string name, ActivityKind activityKind, ActivityContext parentContext, HashMap<string, object> activityTags, Seq<ActivityLink> activityLinks, DateTimeOffset startTime, K<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.
param | name | The operation name of the activity. |
param | activityKind | The activity kind. |
param | parentContext | The parent |
param | activityTags | The optional tags list to initialise the created activity object with. |
param | activityLinks | The optional |
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 |
method Eff<RT, Unit> setTraceState (string traceStateString) Source #
Set the state trace string
param | traceStateString | Trace state string |
returns | Unit effect |
method Eff<RT, Unit> addBaggage (string key, string? value) Source #
Add baggage to the current activity
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
param | name | Tag name |
param | value | Tag value |
returns | Unit effect |