networkErrorFilter selects exchanges that did not survive the trip to the upstream, whether because of a DNS failure, a refused TCP connection, a botched TLS handshake or a dropped connection. It is the right tool for building observability on top of unreliable upstreams without having to instrument the application itself.
Reach for networkErrorFilter when a rule should only fire on exchanges that failed at the network layer. These are exchanges where Fluxzy could not complete the TCP connect, the DNS resolution failed, the TLS handshake errored out, or the upstream closed the connection unexpectedly.
Typical situations:
stdErrAction when a flaky upstream starts dropping connections.The filter evaluates on the responseHeaderReceivedFromRemote scope, which is the moment Fluxzy decides whether a response will materialize or whether the exchange has effectively failed. It is the safety net for transport level failures.
Append a line for each failed exchange to a dedicated log file so you can review the failure pattern later without scrolling through every exchange.
rules:
- filter:
typeKind: NetworkErrorFilter
actions:
- typeKind: FileAppendAction
filename: /var/log/fluxzy/network-errors.log
text: "{{exchange.url}} {{exchange.id}}"
Apply a tag to every network error so they group together in the Fluxzy capture view, making it easy to filter the failure set when reviewing a session.
rules:
- filter:
typeKind: NetworkErrorFilter
actions:
- typeKind: ApplyTagAction
tag:
value: network-error
Stream a one line message to standard error each time an exchange fails, useful in CI runs or container logs where the operator should be alerted immediately.
rules:
- filter:
typeKind: NetworkErrorFilter
actions:
- typeKind: StdErrAction
text: "network error on {{exchange.url}}"
Select exchanges that fails due to network error.
Evaluation scope defines the timing where this filter will be applied.
responseHeaderReceivedFromRemote This scope occurs the moment fluxzy has done parsing the response header.
networkErrorFilter
This filter has no specific characteristic
The following table describes the customizable properties available for this filter:
| Property | Type | Description | DefaultValue |
|---|---|---|---|
| inverted | boolean | Negate the filter result | false |
The following examples apply a comment to the filtered exchange
Select exchanges that fails due to network error.
rules:
- filter:
typeKind: NetworkErrorFilter
actions:
- typeKind: ApplyCommentAction
comment: filter was applied
View definition of NetworkErrorFilter for .NET integration.
This filter has no related filter
It catches transport level failures including DNS resolution errors, TCP connect failures, TLS handshake errors and unexpected connection resets that happen before a complete response is received.
No. A 5xx response is a successful exchange from the network point of view, the upstream did send a response. Use statusCodeServerErrorFilter for application level errors and networkErrorFilter for transport level ones.
On the responseHeaderReceivedFromRemote scope. The check happens at the moment Fluxzy decides whether the exchange produced a response or failed in transit.
Yes. Wrap networkErrorFilter inside a FilterCollection together with a hostFilter or pathFilter to scope the rule to failures on a specific endpoint.