Skip to content

[Azure Pipelines Scalar] Create log entry when Azure DevOps API rate limit is (nearly) reached #6284

@raherrebrugh

Description

@raherrebrugh

Proposal

I want the keda operator to create a log warning when the Azure Pipelines Scalar makes a call to Azure DevOps API and the response indicates the API rate limit is (nearly) reached.

Azure DevOps API sets the following (among other) headers when the API rate limit is (nearly) reached:

  1. X-RateLimit-Delay
  2. X-RateLimit-Remaining

X-RateLimit-Delay indicates by how many seconds the requests are delayed
X-RateLimit-Remaining indicates how many TSTUs are left before request are being rate limited

More information on the headers is documented at
https://github.com/MicrosoftDocs/azure-devops-docs/blob/main/docs/integrate/concepts/rate-limits.md

Use-Case

I would like to be able to monitor the logs and detect when the account used by Keda is reaching the Azure DevOps API Rate Limits. This allows me to detect a potential issue before the entire queueing mechanism freezes up because Keda is overloading the Azure DevOps API.

Is this a feature you are interested in implementing yourself?

Yes

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Ready To Ship

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions