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.
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}"
}
]
}
}