IAPM
Metadata of the APM client.
Stops tracking a timed operation.
This will not send the measure to the sinks.
ICounterMeasure CountOperation(string name, Guid workspaceGuid = default, string correlationID = "", string unitOfMeasure = "operation(s)", bool directWrite = true, int? resolution = default, Dictionary<string, object> customData = null, IEnumerable<ISink> sinks = null)
Creates a new counter which can be used to increment or decrement a long value.
Creates a semi-unique identifier from the given parameters.
Stops tracking a timed operation.
This will send the time the measure has been running for to the sinks.
IGaugeMeasure GaugeOperation<T>(string name, Func<T> operation, Guid workspaceGuid = default, string correlationID = "", string unitOfMeasure = "item(s)", Dictionary<string, object> customData = null, IEnumerable<ISink> sinks = null)
Retrieves a value as defined by the operation. For example the number of items inside a queue.
Call the Write() method to actually read the value and write to log.
IHealthMeasure HealthCheckOperation(string name, Func<HealthCheckOperationResult> healthFunction, Guid workspaceGuid = default, string correlationID = "", Dictionary<string, object> customData = null, IEnumerable<ISink> sinks = null)
Creates a new health check. When the Write method is executed, the health function is run and the response is written to the sink.
IHealthMeasureWithArg<T> HealthCheckOperation<T>(string name, Func<T, HealthCheckOperationResult> healthFunction, Guid workspaceGuid = default, string correlationID = "", Dictionary<string, object> customData = null, IEnumerable<ISink> sinks = null)
Creates a new health check that takes in a parameter. When the Write method is executed, the health function is run with the parameter passed into the Write method and the response is written to the sink.
IMeterMeasure MeterOperation(string name, string measuring = "operation(s)", TimeUnit rateUnit = 3, Guid workspaceGuid = default, string correlationID = "", Dictionary<string, object> customData = null, IEnumerable<ISink> sinks = null)
Creates a new meter operations that measures the rate at which the operation occurs.
string StartTimedOperation(string name, Guid workspaceGuid = default, string correlationID = "", object identifier = null, bool markStart = false, TimeSpan? warnIfExceeds = default, Dictionary<string, object> customData = null, IEnumerable<ISink> sinks = null)
Starts a timed operation and holds onto it in memory.
This allows the operation to be started in one method and stoped in another method.
Uses the correlationID to create a more unique measure identifier.
In addition you can specify a warning limit. If it takes more time to execute the code than the specified limit, another message will be sent to the sink.
ITimedGaugeMeasure TimedGaugeOperation<T>(string name, Func<T> operation, TimeSpan interval, Guid workspaceGuid = default, string correlationID = "", string unitOfMeasure = "item(s)", Dictionary<string, object> customData = null, IEnumerable<ISink> sinks = null, bool runNow = true)
Retrieves a value as defined by the operation. For example the number of items inside a queue. The operation is triggered automatically on a defined interval.
ITimerMeasure TimedOperation(string name, Guid workspaceGuid = default, string correlationID = "", object identifier = null, bool markStart = false, TimeSpan? warnIfExceeds = default, Dictionary<string, object> customData = null, IEnumerable<ISink> sinks = null)
Begins an operation by placing the code to be timed inside a using block.
When the block is being exited, the time it took is sent to the sink.
In addition you can specify a warning limit. If it takes more time to execute the code than the specified limit, another message will be sent to the sink.
void TimedOperation(string name, double precalculatedMilliseconds, Guid workspaceGuid = default, string correlationID = "", Dictionary<string, object> customData = null, IEnumerable<ISink> sinks = null)
Logs a single TimeSpan that has already been obtained outside this framework.