Skip to content

new handler design: sunset header detection #89

@baywet

Description

@baywet

AGS has started returning sunset headers on deprecated operations.
We already have a tracing infrastructure thanks to Open Telemetry and create spans that are enriched by each middleware hander.
Implementing a handler that warns on sunset would allow admins and SecOps to provide feedback to their development teams so they can update an application before it gets impacted by APIs retirement.

We could had a new handler that would:

  1. start a new span (parent span from the context
  2. add a boolean attribute about whether the operation returned a sunset header or not.
  3. set the span status to error when a sunset header is present and the represented date is less that a year from now (default value), with the description being the an explicit message saying this API will be inoperative at date X
  4. add date attribute to the span when present

This handler can be configured with its dedicated option, the option provide the following fields:

  • enabled (boolean), default true
  • sunsetAsErrorDelay (timespan), default one year

We don't need to log the URL or the HTTP verb as attributes as this is already done by the client/other handlers.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions