Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(trace): add retry after header #19

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

GALLLASMILAN
Copy link
Contributor

@GALLLASMILAN GALLLASMILAN commented Dec 17, 2024

Closes: #16

Changes

I added the Retry-After

Definition

The HTTP Retry-After response header indicates how long the user agent should wait before making a follow-up request. There are three main cases this header is used:

  • In a 503 Service Unavailable response, this indicates how long the service is expected to be unavailable.
  • In a 429 Too Many Requests response, this indicates how long to wait before making a new request.
  • In a redirect response, such as 301 Moved Permanently, this indicates the minimum time that the user agent is asked to wait before issuing the redirected request.

for /v1/traces/{id} route

I added this header only for this one route, not for all 404 responses

A 404 Not Found status code signifies that the resource does not exist on the server. Since the issue is not temporary, retrying the request later usually won’t make sense. For clients, this may cause confusion, as Retry-After suggests that the resource might become available after some time, which is contradictory to the meaning of 404.

! Because in the case of v1/traces/{id} the resource is temporarily unavailable. !

Signed-off-by: GALLLASMILAN <gallas.milan@gmail.com>
@GALLLASMILAN GALLLASMILAN force-pushed the add-retry-after-header branch from c33c625 to b2560ef Compare December 17, 2024 10:06
@GALLLASMILAN GALLLASMILAN merged commit 9076e38 into main Dec 18, 2024
2 checks passed
@GALLLASMILAN GALLLASMILAN deleted the add-retry-after-header branch December 18, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add retry-after header
2 participants