Interface ITelemetryOperationHolder
Represents the operation item that holds telemetry which is tracked on end request. Operation can be associated with either WEB or SQL dependencies.
Namespace: DNVGL.One.Telemetry.Core
Assembly: DNVGL.One.Telemetry.Core.dll
Syntax
public interface ITelemetryOperationHolder
Properties
View SourceDuration
Gets or sets the duration of the operation.
Declaration
TimeSpan Duration { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
Id
Gets or sets Operation ID.
Declaration
string Id { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Metrics
Gets the custom metrics collection.
Declaration
IDictionary<string, double> Metrics { get; }
Property Value
| Type | Description |
|---|---|
| IDictionary<System.String, System.Double> |
Name
Gets or sets the name of the operation.
Declaration
string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Properties
Gets the custom properties collection.
Declaration
IDictionary<string, string> Properties { get; }
Property Value
| Type | Description |
|---|---|
| IDictionary<System.String, System.String> |
Success
Gets or sets whether operation has finished successfully.
Declaration
bool? Success { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Boolean> |
Timestamp
Gets or sets the timestamp for the operation.
Declaration
DateTimeOffset Timestamp { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTimeOffset |
Methods
View SourceSetFailed()
Sets the operation as failed.
Declaration
void SetFailed()
SetSuccess()
Sets the operation as successful success.
Declaration
void SetSuccess()
StopOperation()
Stop operation computes the duration of the operation and tracks it using the respective telemetry client.
Declaration
void StopOperation()