A telemetry module or artifact. A module represents an instrumented entity that has a dedicated configuration. More...
Inherits INativeHandle.
Public Member Functions | |
| void | Dispose (bool disposing) |
| IDisposable helper function. | |
| void | Dispose () |
| IDisposable implementation. | |
| Module (string name, string version) | |
| Creates a new module. | |
| Module (string name, Version version) | |
| Creates a new module. | |
| Span | StartSpan ([CallerMemberName] string name="") |
| Creates a new Span object. | |
| void | Log (LogLevel logLevel, string message) |
| Logs a single message. | |
| void | LogDebug (string message) |
| Logs a single message with LogLevel.Debug. | |
| void | LogInfo (string message) |
| Logs a single message with LogLevel.Info. | |
| void | LogWarning (string message) |
| Logs a single message with LogLevel.Warning. | |
| void | LogError (string message) |
| Logs a single message with LogLevel.Error. | |
| void | LogFatal (string message) |
| Logs a single message with LogLevel.Fatal. | |
| Log | LogExtended (LogLevel logLevel) |
| Creates a log object you can manually add messages and attributes to using Log.AddMessage(string) and Log.AddAttribute(string, string). | |
| Log | LogDebugExtended () |
| Creates a log object with LogLevel.Debug you can manually add messages and attributes to using Log.AddMessage(string) and Log.AddAttribute(string, string). | |
| Log | LogInfoExtended () |
| Creates a log object with LogLevel.Info you can manually add messages and attributes to using Log.AddMessage(string) and Log.AddAttribute(string, string). | |
| Log | LogWarningExtended () |
| Creates a log object with LogLevel.Warning you can manually add messages and attributes to using Log.AddMessage(string) and Log.AddAttribute(string, string). | |
| Log | LogErrorExtended () |
| Creates a log object with LogLevel.Error you can manually add messages and attributes to using Log.AddMessage(string) and Log.AddAttribute(string, string). | |
| Log | LogFatalExtended () |
| Creates a log object with LogLevel.Fatal you can manually add messages and attributes to using Log.AddMessage(string) and Log.AddAttribute(string, string). | |
Properties | |
| bool | WouldTrace [get] |
| Returns true if tracing is enabled. | |
| bool | WouldLog [get] |
| Returns true if logging is enabled. | |
| LogLevel | LogLevel [get] |
| The maximum LogLevel that will be logged if WouldLog is true. | |
| IntPtr | Handle [get] |
| Native handle of the Module. | |
| bool | IsDisposed [get] |
| Gets if the native handle has been disposed. | |
Events | |
| 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 telemetry module or artifact. A module represents an instrumented entity that has a dedicated configuration.
Be aware that multiple module instances may conflict within the same process. Users are encouraged to define a singleton instance for their module.
| Module | ( | string | name, |
| string | version ) |
Creates a new module.
| name | Name of the module. |
| version | Version of the module. |
| Module | ( | string | name, |
| Version | version ) |
Creates a new module.
| name | Name of the module. |
| version | Version of the module. |
| void Dispose | ( | bool | disposing | ) |
IDisposable helper function.
| disposing |
Logs a single message.
| logLevel | LogLevel of the message. |
| message | The message to log. |
| void LogDebug | ( | string | message | ) |
Logs a single message with LogLevel.Debug.
| message | Message to log. |
| Log LogDebugExtended | ( | ) |
Creates a log object with LogLevel.Debug you can manually add messages and attributes to using Log.AddMessage(string) and Log.AddAttribute(string, string).
| void LogError | ( | string | message | ) |
Logs a single message with LogLevel.Error.
| message | Message to log. |
| Log LogErrorExtended | ( | ) |
Creates a log object with LogLevel.Error you can manually add messages and attributes to using Log.AddMessage(string) and Log.AddAttribute(string, string).
Creates a log object you can manually add messages and attributes to using Log.AddMessage(string) and Log.AddAttribute(string, string).
| logLevel | LogLevel of the log object. |
| void LogFatal | ( | string | message | ) |
Logs a single message with LogLevel.Fatal.
| message | Message to log. |
| Log LogFatalExtended | ( | ) |
Creates a log object with LogLevel.Fatal you can manually add messages and attributes to using Log.AddMessage(string) and Log.AddAttribute(string, string).
| void LogInfo | ( | string | message | ) |
Logs a single message with LogLevel.Info.
| message | Message to log. |
| Log LogInfoExtended | ( | ) |
Creates a log object with LogLevel.Info you can manually add messages and attributes to using Log.AddMessage(string) and Log.AddAttribute(string, string).
| void LogWarning | ( | string | message | ) |
Logs a single message with LogLevel.Warning.
| message | Message to log. |
| Log LogWarningExtended | ( | ) |
Creates a log object with LogLevel.Warning you can manually add messages and attributes to using Log.AddMessage(string) and Log.AddAttribute(string, string).
| Span StartSpan | ( | [CallerMemberName] string | name = "" | ) |
| NativeHandleEventDelegate ObjectDisposing |
Raised when this object is about to be disposed via the IDisposable.Dispose method.
This event is raised right before this object is disposed. The dispose itself cannot be canceled.