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

Prototype: Composable retry classifiers - enable composition in Azure.Core #41542

Conversation

annelo-msft
Copy link
Member

Investigation into issue #41465

context.AddClassifier(404, false);
context.AddClassifier(500, false);
context.AddClassifier(new RetryClassificationHandler());
context.AddClassifier(new StatusCodeHandler(404, true));
Copy link
Member Author

@annelo-msft annelo-msft Jan 24, 2024

Choose a reason for hiding this comment

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

Illustrates how an end-user would compose retriable-response and error-response classifiers using handler approach. Note that adding a handler via this interface means that we must use a ChainingClassifier for both retry and error classifications. This adds performance overhead to the optimized StatusCodeClassifier for when classifying errors for all calls to pipeline.Send for this operation.

An implementation that lets users customize retry classification without impacting error classification performance might be preferable.

@azure-sdk
Copy link
Collaborator

azure-sdk commented Jan 24, 2024

API change check

APIView has identified API level changes in this PR and created following API reviews.

Azure.Core
System.ClientModel

@annelo-msft annelo-msft changed the title Prototype: Composable retry classifiers Prototype: Composable retry classifiers - enable composition in Azure.Core Jan 24, 2024
@annelo-msft
Copy link
Member Author

Closing in favor of #41595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants