Skip to content

Create AspNetResponseStatus collection rule trigger #656

@jander-msft

Description

@jander-msft
  • Create a trigger named AspNetResponseStatus that notifies when a number of HTTP responses with matching status codes exceeds a threshold during a specified sliding window of time.
  • Create a strong-typed options class, e.g. AspNetResponseStatusTriggerOptions, that has the following properties:
    • The StatusCodes property is of type string and specifies the HTTP status codes to match. This value can be a single code, a range of codes, or a list of single codes and/or range of codes.
    • The ResponseCount property is of type int and specifies the threshold count for the trigger condition to be satisfied.
    • The SlidingWindowDuration property is of type TimeSpan and specifies the time window in which the number of responses (as specified by ResponseCount) with matching status codes must occur for the trigger condition to be satisfied.
    • The IncludedPaths property is of type string and specifies the list of request paths which should be monitored. If not specified, all paths are monitored (except for those specified in ExcludedPaths). The elements of the list are semi-colon delimited.
    • The ExcludedPaths property is of type string and specifies the list of request paths which should be ignored when monitoring. The elements of the list are semi-colon delimited.
  • Create and register an IValidateOptions<T> for the response status trigger options:
    • The StatusCodes property is required. It can be a single status code (e.g. 400), a range of codes (e.g. 400-499), or a list of single codes and/or ranges of codes (e.g. 200-299;300;400-450;500). All codes are required to be integers (there will not be any translation of status code names to status code values, or vice versa).
    • The ResponseCount property is required.
    • The SlidingWindowDuration property is required. It must be greater than or equal to 1 second. It cannot be infinite.
    • The IncludedPaths property is optional.
    • The ExcludedPaths property is optional.

Contingent on #647 investigation.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions