Skip to content

gravitee-io/gravitee-policy-traffic-shadowing

Repository files navigation

Traffic Shadowing

Gravitee.io License Releases CircleCI

Phase

onRequest onResponse onRequestContent onResponseContent

X

-

-

-

Description

Traffic shadowing allows to asynchronously copy the traffic to another service. By using this policy, the requests are duplicated and sent to the target. The target is an endpoint defined at the API level. The request can be enriched with additional headers.

Compatibility with APIM

Plugin version

APIM version

2.x and upper

3.19.9, 3.20.3 and upper

Configuration

Property Required Description Default Example

target

X

The target endpoint (supports EL).

-

{#endpoints['my-endpoint']}

headers

-

A list of HTTP headers.

-

-

Traffic Shadowing Policy example:
{
  "traffic-shadowing": {
    "target": "{#endpoints['target-endpoint']}",
    "headers": [
        {
            "name": "X-Gravitee-Request-Id",
            "value": "{#request.id}"
        }
    ]
  }
}