Repository navigation
feat: implement transformerProxy for am - #4703
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Allure Test reports for this run are available at:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Allure Test reports for this run are available at:
|
|
Allure Test reports for this run are available at:
|
|
Allure Test reports for this run are available at:
|
| throw new ThrottledError( | ||
| `Request Failed during ${DESTINATION} response transformation: ${error} - due to Request Limit exceeded, (Throttled)`, | ||
| destinationResponse, | ||
| ); |
There was a problem hiding this comment.
Why do we need two different retryable errors?
There was a problem hiding this comment.
Can we get this answered?
|
Allure Test reports for this run are available at:
|
|
@ItsSudip Can you add PR description detailing the changes? |
|
Allure Test reports for this run are available at:
|
|



What are the changes introduced in this PR?
This PR implements transformerProxy support for Amplitude (am) destination through the v1 route. It introduces a new network handler that enables proxy-based event delivery with comprehensive error handling, batch support, and Amplitude-specific response processing.
What is the related Linear task?
Resolves INT-4077
Please explain the objectives of your changes below
This PR enables the transformerProxy functionality for Amplitude destination, which was previously unsupported. The implementation allows events to be delivered through the proxy layer with proper response handling, error classification, and retry logic specific to Amplitude's API behavior.
Key Objectives:
Any changes to existing capabilities/behaviour, mention the reason & what are the changes?
No changes to existing capabilities. This is a new feature addition that:
Any new dependencies introduced with this change?
No new dependencies. The implementation uses existing utilities:
@rudderstack/integrations-lib(already exists)prepareProxyRequest,proxyRequest)processAxiosResponse, HTTP status helpers)Any new generic utility introduced or modified. Please explain the changes.
No new generic utilities. The implementation leverages existing utilities:
isHttpStatusSuccess,isHttpStatusRetryable,isHttpStatusThrottledhelpersAbortedError,RetryableError,ThrottledErrorerror classesAny technical or performance related pointers to consider with the change?
Technical Considerations:
Error Classification: Implements intelligent error handling:
RetryableError(will retry with backoff)ThrottledError(circuit breaker logic)Batch Processing Logic:
dontBatch: trueAmplitude-Specific Handling:
throttled_usersandthrottled_devicesresponse fieldsPerformance Benefits:
Test Coverage:
@coderabbitai review
Developer checklist
Reviewer checklist
Files Changed Summary
1.
src/v1/destinations/am/networkHandler.ts(New File - 107 lines)Purpose: Implements v1 transformerProxy network handler for Amplitude
Key Components:
populateResponseWithDontBatch(): Creates individual error responses for batch processing failuresresponseHandler(): Main response handler with comprehensive error classificationnetworkHandler(): Binds proxy functions to handler contextError Handling Logic:
2.
test/integrations/destinations/am/dataDelivery/data.ts(+11 lines)Purpose: Enable comprehensive proxy v1 test cases
Changes: Changed
skip: truetoskip: falsefor 11 test cases covering:Test Coverage: Success scenarios, error handling, throttling, batching, single/multiple events
Impact Analysis
What Works Now (That Didn't Before):
Backward Compatibility:
Risk Assessment: LOW