Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 1.4 KB

api-management-validation-policy-common.md

File metadata and controls

22 lines (17 loc) · 1.4 KB
author ms.service ms.topic ms.date ms.author
dlepow
azure-api-management
include
12/05/2022
danlep

Logs

Details about the validation errors during policy execution are logged to the variable in context.Variables specified in the errors-variable-name attribute in the policy's root element. When configured in a prevent action, a validation error blocks further request or response processing and is also propagated to the context.LastError property.

To investigate errors, use a trace policy to log the errors from context variables to Application Insights.

Performance implications

Adding a validation policy may affect API throughput. The following general principles apply:

  • The larger the API schema size, the lower the throughput will be.
  • The larger the payload in a request or response, the lower the throughput will be.
  • The size of the API schema has a larger impact on performance than the size of the payload.
  • Validation against an API schema that is several megabytes in size may cause request or response timeouts under some conditions. The effect is more pronounced in the Consumption and Developer tiers of the service.

We recommend performing load tests with your expected production workloads to assess the impact of validation policies on API throughput.