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

fix: keep alive when dispatch fails with 401 #551

Merged
merged 1 commit into from
May 7, 2024

Conversation

williazz
Copy link
Contributor

@williazz williazz commented May 7, 2024

When dispatch fails with 401, then RUM should keep alive.

RUM backend does not respond with 401 so this is change is not relevant for standard setups. However, some users have setup proxy servers with valid use cases.

For example #524 (comment)


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@williazz williazz changed the title feat: keep alive when dispatch fails with 401 fix: keep alive when dispatch fails with 401 May 7, 2024
@@ -479,36 +479,6 @@ describe('Dispatch tests', () => {
expect((dispatch as unknown as any).enabled).toBe(true);
});

test('when a fetch request is rejected with 401 then dispatch is disabled', async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: do we need reverse of this unit test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not scalable for every status code to have a separate unit test. In the future, we should consolidate them into either "keep alive" or "disable".

@ps863
Copy link
Member

ps863 commented May 7, 2024

LGTM

@williazz williazz merged commit b9823bd into aws-observability:main May 7, 2024
3 checks passed
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.

2 participants