Skip to content

Commit

Permalink
chore: refactoring amplitude using optional chaining (#2645)
Browse files Browse the repository at this point in the history
* chore: refactoring amplitude using optional chaining

* test cases added for source endpoint

* chore: minor fixes

* chore: comment addressed

* chore: solve sonar issues 1

* chore: solve sonar issues 2

* chore: solve sonar issues 3

* chore: resolve sonar hotspot

* chore: resolve sonar

* chore: solve sonar issues 4

* chore: small fixes and test cases addition

* chore: small fixes and test cases addition+1

* chore: merge develop issue fix

* Update src/v0/destinations/am/transform.js

Co-authored-by: Sankeerth <[email protected]>

* Update src/v0/destinations/am/transform.js

Co-authored-by: Sankeerth <[email protected]>

* chore: addressed comments

* chore: reduce cognitive complexity+1

* chore: add test cases

* chore: addressed comments

* chore: addressed comments+1

* chore: comments addressed

* chore: comments addressed+1

* chore: resolve sonar

* chore: comments addressed+2

* sonarcloud fix+1

---------

Co-authored-by: Sai Sankeerth <[email protected]>
Co-authored-by: Sankeerth <[email protected]>
  • Loading branch information
3 people authored Nov 2, 2023
1 parent c38f14f commit 57fee04
Show file tree
Hide file tree
Showing 11 changed files with 1,224 additions and 423 deletions.
5 changes: 4 additions & 1 deletion src/v0/destinations/am/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ events.forEach((event) => {
const DELETE_MAX_BATCH_SIZE = 100;
const DESTINATION = 'amplitude';
const IDENTIFY_AM = '$identify';

const AMBatchSizeLimit = 20 * 1024 * 1024; // 20 MB
const AMBatchEventLimit = 500; // event size limit from sdk is 32KB => 15MB
module.exports = {
DESTINATION,
Event,
Expand All @@ -134,4 +135,6 @@ module.exports = {
DELETE_MAX_BATCH_SIZE,
batchEventsWithUserIdLengthLowerThanFive,
IDENTIFY_AM,
AMBatchSizeLimit,
AMBatchEventLimit
};
Loading

0 comments on commit 57fee04

Please sign in to comment.