Interface IForwarderTelemetryConsumer
A consumer of Yarp.ReverseProxy EventSource events.
Namespace: Yarp.Telemetry.Consumption
Assembly: Yarp.Telemetry.Consumption.dll
Syntax
public interface IForwarderTelemetryConsumer
Methods
| Improve this Doc View SourceOnContentTransferred(DateTime, Boolean, Int64, Int64, TimeSpan, TimeSpan, TimeSpan)
Called after transferring the request or response content.
Declaration
virtual void OnContentTransferred(DateTime timestamp, bool isRequest, long contentLength, long iops, TimeSpan readTime, TimeSpan writeTime, TimeSpan firstReadTime)
Parameters
Type | Name | Description |
---|---|---|
DateTime | timestamp | Timestamp when the event was fired. |
System.Boolean | isRequest | Indicates whether we transfered the content from the client to the backend or vice-versa. |
System.Int64 | contentLength | Number of bytes transferred. |
System.Int64 | iops | Number of read/write pairs performed. |
TimeSpan | readTime | Time spent reading from the source. |
TimeSpan | writeTime | Time spent writing to the destination. |
TimeSpan | firstReadTime | Time spent on the first read of the source. |
OnContentTransferring(DateTime, Boolean, Int64, Int64, TimeSpan, TimeSpan)
Called periodically while a content transfer is active.
Declaration
virtual void OnContentTransferring(DateTime timestamp, bool isRequest, long contentLength, long iops, TimeSpan readTime, TimeSpan writeTime)
Parameters
Type | Name | Description |
---|---|---|
DateTime | timestamp | Timestamp when the event was fired. |
System.Boolean | isRequest | Indicates whether we are transferring the content from the client to the backend or vice-versa. |
System.Int64 | contentLength | Number of bytes transferred. |
System.Int64 | iops | Number of read/write pairs performed. |
TimeSpan | readTime | Time spent reading from the source. |
TimeSpan | writeTime | Time spent writing to the destination. |
OnForwarderFailed(DateTime, ForwarderError)
Called before OnForwarderStop(DateTime, Int32) if forwarding the request failed.
Declaration
virtual void OnForwarderFailed(DateTime timestamp, ForwarderError error)
Parameters
Type | Name | Description |
---|---|---|
DateTime | timestamp | Timestamp when the event was fired. |
ForwarderError | error | ForwarderError information for the forwarding failure. |
OnForwarderInvoke(DateTime, String, String, String)
Called before forwarding a request.
Declaration
virtual void OnForwarderInvoke(DateTime timestamp, string clusterId, string routeId, string destinationId)
Parameters
Type | Name | Description |
---|---|---|
DateTime | timestamp | Timestamp when the event was fired. |
System.String | clusterId | Cluster ID |
System.String | routeId | Route ID |
System.String | destinationId | Destination ID |
OnForwarderStage(DateTime, ForwarderStage)
Called when reaching a given stage of forwarding a request.
Declaration
virtual void OnForwarderStage(DateTime timestamp, ForwarderStage stage)
Parameters
Type | Name | Description |
---|---|---|
DateTime | timestamp | Timestamp when the event was fired. |
ForwarderStage | stage | Stage of the forwarding operation. |
OnForwarderStart(DateTime, String)
Called before forwarding a request.
Declaration
virtual void OnForwarderStart(DateTime timestamp, string destinationPrefix)
Parameters
Type | Name | Description |
---|---|---|
DateTime | timestamp | Timestamp when the event was fired. |
System.String | destinationPrefix |
OnForwarderStop(DateTime, Int32)
Called after forwarding a request.
Declaration
virtual void OnForwarderStop(DateTime timestamp, int statusCode)
Parameters
Type | Name | Description |
---|---|---|
DateTime | timestamp | Timestamp when the event was fired. |
System.Int32 | statusCode | The status code returned in the response. |