Skip to content

Commit

Permalink
feat: adds sunset handler specification
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <[email protected]>
  • Loading branch information
baywet committed Aug 1, 2024
1 parent 6e90cb0 commit 97767fa
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,15 @@ Open Telemetry spans are nested and can have attributes attached to each span. T
"com.microsoft.kiota.handler.decompression.enable": "boolean, true if the handler is present and enabled",
"ParametersNameDecodingHandler_intercept?": {
"com.microsoft.kiota.handler.parameters_name_decoding.enable": "boolean, true if the handler is present and enabled",
"Request_transport?": {
// this span is present only to measure network latency and deduct it from the middleware pipeline
"SunsetHandler_intercept?": {
"com.microsoft.kiota.handler.sunset.enable": "boolean, true if the handler is present and enabled",
"Event - com.microsoft.kiota.sunset_header_received?": {
// raised only if a sunset header is present in the response
"sunset_date": "Date at internet date format from the sunset header value",
},
"Request_transport?": {
// this span is present only to measure network latency and deduct it from the middleware pipeline
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This repository holds documents related to current and on-going work on Microsof
| | [Response decompression Handler](middleware/DecompressionHandler.md) |[][dotnet_decompressionhandler]|N|N|N|[][dotnet_decompressionhandler]| |
| | [Logging Handler](middleware/LoggingHandler.md) (PowerShell only since other languages implement Observability/OTEL ) || | | |[][powershell_logginghandler]| |
| | [Telemetry Handler](middleware/TelemetryHandler.md) |[][dotnet_telemetryhandler]|[][java_telemetryhandler]|||[][powershell_telemetryhandler]| | |[][python_telemetryhandler] | [][go_telemetryhandler]|
| | [Sunset Handler](middleware/SunsetHandler.md) |
| | Connection Management | | | | | | |
| | Long Running Operations | | | | | | |
| | Chaos Handler | |[][java_chaoshandler] |O| | | |
Expand Down
13 changes: 13 additions & 0 deletions middleware/SunsetHandler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Sunset Handler

## Objectives

Let application operation teams know that a given operation depends on an API which is slated for removal so they can proactively update the application before a breakage occurs.

## Requirements

- MUST provide an option to disable the behaviour for a given request with a settable default for all requests.
- Additional observability requirements in [Observability](../Observability.md)
- MUST create an event under the span (see Observability) whenever an [HTTP sunset header](https://datatracker.ietf.org/doc/html/rfc8594) is encountered in the response.
- The additional event MUST contain the sunset date value provided by the header as an attribute.
- The span and event MUST NOT contain the URI since parent spans already offer that tag/attribute and it could contain sensitive information.

0 comments on commit 97767fa

Please sign in to comment.