A span object to report traces. More...
Inherits AttributeMap.
Public Member Functions | |
| void | Succeed () |
| Set the span status to success. | |
| T | Succeed< T > (T value) |
| Return a result and set the span status to success. | |
| void | Fail () |
| Set the span status to fail. | |
| void | Fail (string message) |
| Set the span status to fail with a message. | |
| T | Return< T > (T value) |
| Set the span status based on return code evaluation. | |
| T | ReturnBool< T > (T value) |
| Set the span status based on a boolean interpretation of a result. | |
| void | SetStatusMessage (string msg) |
| Sets the status message. | |
| void | Raise (Exception ex) |
| Set the span status to fail and throw an exception. | |
| Span | AddAttribute (string name, string value) |
| Adds a string attribute to the span. | |
| Span | AddAttribute (string name, long value) |
| Adds a long attribute to the span. | |
| Span | AddAttribute (string name, bool value) |
| Adds a bool attribute to the span. | |
| Span | AddAttribute (string name, double value) |
| Adds a double attribute to the span. | |
Public Member Functions inherited from AttributeMap | |
| virtual void | Dispose (bool disposing) |
| IDisposable helper function. | |
| void | Dispose () |
| IDisposable implementation. | |
Protected Member Functions | |
| override void | SendData () |
| Sends the span. | |
Protected Member Functions inherited from AttributeMap | |
| void | Attribute (string name, string value) |
| Adds a string attribute to the map. | |
| void | Attribute (string name, bool value) |
| Adds a bool attribute to the map. | |
| void | Attribute (string name, long value) |
| Adds a long attribute to the map. | |
| void | Attribute (string name, double value) |
| Adds a double attribute to the map. | |
| void | SendData () |
| Sends the data. | |
Additional Inherited Members | |
Properties inherited from AttributeMap | |
| bool | IsEnabled [get] |
| If this object is active. | |
| IntPtr | Handle [get] |
| Native handle of the Module. | |
| bool | IsDisposed [get] |
| Gets if the native handle has been disposed. | |
Events inherited from AttributeMap | |
| NativeHandleEventDelegate | ObjectDisposing |
| Raised when this object is about to be disposed via the IDisposable.Dispose method. | |
Events inherited from INativeHandle | |
| NativeHandleEventDelegate | ObjectDisposing |
| Raised when this object is about to be disposed via the IDisposable.Dispose method. | |
A span object to report traces.
When tracing is disabled, operations on a Span object are no-ops.
| Span AddAttribute | ( | string | name, |
| bool | value ) |
Adds a bool attribute to the span.
| name | Name/key of the attribute. |
| value | Value of the attribute. |
| Span AddAttribute | ( | string | name, |
| double | value ) |
Adds a double attribute to the span.
| name | Name/key of the attribute. |
| value | Value of the attribute. |
| Span AddAttribute | ( | string | name, |
| long | value ) |
Adds a long attribute to the span.
| name | Name/key of the attribute. |
| value | Value of the attribute. |
| Span AddAttribute | ( | string | name, |
| string | value ) |
Adds a string attribute to the span.
| name | Name/key of the attribute. |
| value | Value of the attribute. |
| void Fail | ( | string | message | ) |
Set the span status to fail with a message.
| message | Failure message. |
| void Raise | ( | Exception | ex | ) |
Set the span status to fail and throw an exception.
| ex | The exception to throw. |
| T Return< T > | ( | T | value | ) |
Set the span status based on return code evaluation.
| T | Type of the return code. |
| value | The return code. |
| T | : | struct |
| T ReturnBool< T > | ( | T | value | ) |
Set the span status based on a boolean interpretation of a result.
| T | Type of the result. |
| value | The result. |
| T | : | struct |
| void SetStatusMessage | ( | string | msg | ) |
Sets the status message.
| msg | The status message. |
| T Succeed< T > | ( | T | value | ) |
Return a result and set the span status to success.
| T | Result type. |
| value | The result to return. |