Skip to content

Commit

Permalink
Update website docs
Browse files Browse the repository at this point in the history
Signed-off-by: Sune Keller <absukl@almbrand.dk>
  • Loading branch information
sirlatrom committed Nov 6, 2020
1 parent ca87351 commit 550c138
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions website/docs/r/api_management_api_diagnostic.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,48 @@ resource "azurerm_api_management_api_diagnostic" "example" {
api_management_name = azurerm_api_management.example.name
api_name = azurerm_api_management_api.example.name
api_management_logger_id = azurerm_api_management_logger.example.id
sampling_percentage = 5.0
always_log_errors = true
log_client_ip = true
verbosity = "Verbose"
http_correlation_protocol = "W3C"
frontend_request {
body_bytes = 32
headers_to_log = [
"content-type",
"accept",
"origin",
]
}
frontend_response {
body_bytes = 32
headers_to_log = [
"content-type",
"content-length",
"origin",
]
}
backend_request {
body_bytes = 32
headers_to_log = [
"content-type",
"accept",
"origin",
]
}
backend_response {
body_bytes = 32
headers_to_log = [
"content-type",
"content-length",
"origin",
]
}
}
```

Expand All @@ -85,6 +127,34 @@ The following arguments are supported:

* `resource_group_name` - (Required) The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.

---

* `always_log_errors` - (Optional) Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.

* `backend_request` - (Optional) A `backend_request` block as defined below.

* `backend_response` - (Optional) A `backend_response` block as defined below.

* `frontend_request` - (Optional) A `frontend_request` block as defined below.

* `frontend_response` - (Optional) A `frontend_response` block as defined below.

* `http_correlation_protocol` - (Optional) The HTTP Correlation Protocol to use. Possible values are `None`, `Legacy` or `W3C`.

* `log_client_ip` - (Optional) Log client IP address.

* `sampling_percentage` - (Optional) Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling.

* `verbosity` - (Optional) Logging verbosity. Possible values are `verbose`, `information` or `error`.

---

A `backend_request`, `backend_response`, `frontend_request` or `frontend_response` block supports the following:

* `body_bytes` - (Optional) Number of payload bytes to log (up to 8192).

* `headers_to_log` - (Optional) Specifies a list of headers to log.

## Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:
Expand Down

0 comments on commit 550c138

Please sign in to comment.