Skip to content

Commit

Permalink
Merge pull request #390 from Countly/ReleasePrep
Browse files Browse the repository at this point in the history
Updates
  • Loading branch information
turtledreams authored Sep 26, 2024
2 parents 44f6cc9 + 7f9b4c5 commit 7f87055
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 24 deletions.
15 changes: 11 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
## 24.4.1
* Added support for Feedback Widget terms and conditions

* Android:
* ! Minor breaking change ! Mitigated an issue where internal SDK limits did not apply
* Added six new configuration options under the 'sdkInternalLimits' interface of 'CountlyConfig':
* 'setMaxKeyLength' for limiting the maximum size of all user provided string keys
* 'setMaxValueSize' for limiting the size of all values in user provided segmentation key-value pairs
* 'setMaxSegmentationValues' for limiting the max amount of user provided segmentation key-value pair count in one event
* 'setMaxBreadcrumbCount' for limiting the max amount of breadcrumbs that can be recorded before the oldest one is deleted
* 'setMaxStackTraceLinesPerThread' for limiting the max amount of stack trace lines to be recorded per thread
* 'setMaxStackTraceLineLength' for limiting the max characters allowed per stack trace lines

* Android Specific Changes:
* ! Minor breaking change ! Introduced SDK internal limits
* Mitigated an issue where the session duration could have been calculated wrongly after a device ID change without merge
* Mitigated an issue where a session could have continued after a device ID change without merge

* iOS:
* iOS Specific Changes:
* Mitigated an issue where internal limits were not being applied to some values
* Mitigated an issue where SDK limits could affect internal keys
* Mitigated an issue that enabled recording reserved events
Expand Down
2 changes: 1 addition & 1 deletion Countly.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ declare module "countly-sdk-react-native-bridge/CountlyConfig" {
/**
* getter for CountlySDKLimits instance that is used to access CountlyConfigSDKInternalLimits methods
*/
limits: CountlyConfigSDKInternalLimits;
sdkInternalLimits: CountlyConfigSDKInternalLimits;

/**
* Method to set the server url
Expand Down
2 changes: 1 addition & 1 deletion CountlyConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CountlyConfig {
return this._countlyConfigApmInstance;
}

get limits() {
get sdkInternalLimits() {
return this._countlyConfigSDKLimitsInstance;
}

Expand Down
36 changes: 18 additions & 18 deletions Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,46 +135,46 @@ function configToJson(config) {
json.attributionValues = config.attributionValues;
}
// Limits -----------------------------------------------
if (config.limits.maxKeyLength) {
if (config.limits.maxKeyLength < 1) {
if (config.sdkInternalLimits.maxKeyLength) {
if (config.sdkInternalLimits.maxKeyLength < 1) {
L.w(`configToJson, Provided value for maxKeyLength is invalid!`)
} else {
json.maxKeyLength = config.limits.maxKeyLength;
json.maxKeyLength = config.sdkInternalLimits.maxKeyLength;
}
}
if (config.limits.maxValueSize) {
if (config.limits.maxValueSize < 1) {
if (config.sdkInternalLimits.maxValueSize) {
if (config.sdkInternalLimits.maxValueSize < 1) {
L.w(`configToJson, Provided value for maxValueSize is invalid!`)
} else {
json.maxValueSize = config.limits.maxValueSize;
json.maxValueSize = config.sdkInternalLimits.maxValueSize;
}
}
if (config.limits.maxSegmentationValues) {
if (config.limits.maxSegmentationValues < 1) {
if (config.sdkInternalLimits.maxSegmentationValues) {
if (config.sdkInternalLimits.maxSegmentationValues < 1) {
L.w(`configToJson, Provided value for maxSegmentationValues is invalid!`)
} else {
json.maxSegmentationValues = config.limits.maxSegmentationValues;
json.maxSegmentationValues = config.sdkInternalLimits.maxSegmentationValues;
}
}
if (config.limits.maxBreadcrumbCount) {
if (config.limits.maxBreadcrumbCount < 1) {
if (config.sdkInternalLimits.maxBreadcrumbCount) {
if (config.sdkInternalLimits.maxBreadcrumbCount < 1) {
L.w(`configToJson, Provided value for maxBreadcrumbCount is invalid!`)
} else {
json.maxBreadcrumbCount = config.limits.maxBreadcrumbCount;
json.maxBreadcrumbCount = config.sdkInternalLimits.maxBreadcrumbCount;
}
}
if (config.limits.maxStackTraceLinesPerThread) {
if (config.limits.maxStackTraceLinesPerThread < 1) {
if (config.sdkInternalLimits.maxStackTraceLinesPerThread) {
if (config.sdkInternalLimits.maxStackTraceLinesPerThread < 1) {
L.w(`configToJson, Provided value for maxStackTraceLinesPerThread is invalid!`)
} else {
json.maxStackTraceLinesPerThread = config.limits.maxStackTraceLinesPerThread;
json.maxStackTraceLinesPerThread = config.sdkInternalLimits.maxStackTraceLinesPerThread;
}
}
if (config.limits.maxStackTraceLineLength) {
if (config.limits.maxStackTraceLineLength < 1) {
if (config.sdkInternalLimits.maxStackTraceLineLength) {
if (config.sdkInternalLimits.maxStackTraceLineLength < 1) {
L.w(`configToJson, Provided value for maxStackTraceLineLength is invalid!`)
} else {
json.maxStackTraceLineLength = config.limits.maxStackTraceLineLength;
json.maxStackTraceLineLength = config.sdkInternalLimits.maxStackTraceLineLength;
}
}
// Limits End --------------------------------------------
Expand Down

0 comments on commit 7f87055

Please sign in to comment.