Skip to content

Commit 7f9b4c5

Browse files
author
Ali Rıza Kat
committed
Updates
1 parent 44f6cc9 commit 7f9b4c5

File tree

4 files changed

+31
-24
lines changed

4 files changed

+31
-24
lines changed

CHANGELOG.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
## 24.4.1
22
* Added support for Feedback Widget terms and conditions
3-
4-
* Android:
5-
* ! Minor breaking change ! Mitigated an issue where internal SDK limits did not apply
3+
* Added six new configuration options under the 'sdkInternalLimits' interface of 'CountlyConfig':
4+
* 'setMaxKeyLength' for limiting the maximum size of all user provided string keys
5+
* 'setMaxValueSize' for limiting the size of all values in user provided segmentation key-value pairs
6+
* 'setMaxSegmentationValues' for limiting the max amount of user provided segmentation key-value pair count in one event
7+
* 'setMaxBreadcrumbCount' for limiting the max amount of breadcrumbs that can be recorded before the oldest one is deleted
8+
* 'setMaxStackTraceLinesPerThread' for limiting the max amount of stack trace lines to be recorded per thread
9+
* 'setMaxStackTraceLineLength' for limiting the max characters allowed per stack trace lines
10+
11+
* Android Specific Changes:
12+
* ! Minor breaking change ! Introduced SDK internal limits
613
* Mitigated an issue where the session duration could have been calculated wrongly after a device ID change without merge
714
* Mitigated an issue where a session could have continued after a device ID change without merge
815

9-
* iOS:
16+
* iOS Specific Changes:
1017
* Mitigated an issue where internal limits were not being applied to some values
1118
* Mitigated an issue where SDK limits could affect internal keys
1219
* Mitigated an issue that enabled recording reserved events

Countly.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ declare module "countly-sdk-react-native-bridge/CountlyConfig" {
11871187
/**
11881188
* getter for CountlySDKLimits instance that is used to access CountlyConfigSDKInternalLimits methods
11891189
*/
1190-
limits: CountlyConfigSDKInternalLimits;
1190+
sdkInternalLimits: CountlyConfigSDKInternalLimits;
11911191

11921192
/**
11931193
* Method to set the server url

CountlyConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class CountlyConfig {
2929
return this._countlyConfigApmInstance;
3030
}
3131

32-
get limits() {
32+
get sdkInternalLimits() {
3333
return this._countlyConfigSDKLimitsInstance;
3434
}
3535

Utils.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -135,46 +135,46 @@ function configToJson(config) {
135135
json.attributionValues = config.attributionValues;
136136
}
137137
// Limits -----------------------------------------------
138-
if (config.limits.maxKeyLength) {
139-
if (config.limits.maxKeyLength < 1) {
138+
if (config.sdkInternalLimits.maxKeyLength) {
139+
if (config.sdkInternalLimits.maxKeyLength < 1) {
140140
L.w(`configToJson, Provided value for maxKeyLength is invalid!`)
141141
} else {
142-
json.maxKeyLength = config.limits.maxKeyLength;
142+
json.maxKeyLength = config.sdkInternalLimits.maxKeyLength;
143143
}
144144
}
145-
if (config.limits.maxValueSize) {
146-
if (config.limits.maxValueSize < 1) {
145+
if (config.sdkInternalLimits.maxValueSize) {
146+
if (config.sdkInternalLimits.maxValueSize < 1) {
147147
L.w(`configToJson, Provided value for maxValueSize is invalid!`)
148148
} else {
149-
json.maxValueSize = config.limits.maxValueSize;
149+
json.maxValueSize = config.sdkInternalLimits.maxValueSize;
150150
}
151151
}
152-
if (config.limits.maxSegmentationValues) {
153-
if (config.limits.maxSegmentationValues < 1) {
152+
if (config.sdkInternalLimits.maxSegmentationValues) {
153+
if (config.sdkInternalLimits.maxSegmentationValues < 1) {
154154
L.w(`configToJson, Provided value for maxSegmentationValues is invalid!`)
155155
} else {
156-
json.maxSegmentationValues = config.limits.maxSegmentationValues;
156+
json.maxSegmentationValues = config.sdkInternalLimits.maxSegmentationValues;
157157
}
158158
}
159-
if (config.limits.maxBreadcrumbCount) {
160-
if (config.limits.maxBreadcrumbCount < 1) {
159+
if (config.sdkInternalLimits.maxBreadcrumbCount) {
160+
if (config.sdkInternalLimits.maxBreadcrumbCount < 1) {
161161
L.w(`configToJson, Provided value for maxBreadcrumbCount is invalid!`)
162162
} else {
163-
json.maxBreadcrumbCount = config.limits.maxBreadcrumbCount;
163+
json.maxBreadcrumbCount = config.sdkInternalLimits.maxBreadcrumbCount;
164164
}
165165
}
166-
if (config.limits.maxStackTraceLinesPerThread) {
167-
if (config.limits.maxStackTraceLinesPerThread < 1) {
166+
if (config.sdkInternalLimits.maxStackTraceLinesPerThread) {
167+
if (config.sdkInternalLimits.maxStackTraceLinesPerThread < 1) {
168168
L.w(`configToJson, Provided value for maxStackTraceLinesPerThread is invalid!`)
169169
} else {
170-
json.maxStackTraceLinesPerThread = config.limits.maxStackTraceLinesPerThread;
170+
json.maxStackTraceLinesPerThread = config.sdkInternalLimits.maxStackTraceLinesPerThread;
171171
}
172172
}
173-
if (config.limits.maxStackTraceLineLength) {
174-
if (config.limits.maxStackTraceLineLength < 1) {
173+
if (config.sdkInternalLimits.maxStackTraceLineLength) {
174+
if (config.sdkInternalLimits.maxStackTraceLineLength < 1) {
175175
L.w(`configToJson, Provided value for maxStackTraceLineLength is invalid!`)
176176
} else {
177-
json.maxStackTraceLineLength = config.limits.maxStackTraceLineLength;
177+
json.maxStackTraceLineLength = config.sdkInternalLimits.maxStackTraceLineLength;
178178
}
179179
}
180180
// Limits End --------------------------------------------

0 commit comments

Comments
 (0)