countly-sdk-react-native-bridge
Advanced tools
Comparing version 24.4.0 to 24.4.1
@@ -0,1 +1,27 @@ | ||
## 24.4.1 | ||
* Added support for Feedback Widget terms and conditions | ||
* 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 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 | ||
* Mitigated an issue where timed events could have no ID | ||
* Mitigated an issue where the request queue could overflow while sending a request | ||
* Removed timestamps from crash breadcrumbs | ||
* Updated the underlying Android SDK version to 24.4.1 | ||
* Updated the underlying iOS SDK version to 24.4.1 | ||
## 24.4.0 | ||
@@ -2,0 +28,0 @@ * ! Minor breaking change ! Tracking of foreground and background time for APM is disabled by default |
@@ -1132,2 +1132,40 @@ interface Segmentation { | ||
class CountlyConfigSDKInternalLimits { | ||
/** | ||
* Limits the maximum size of all string keys | ||
* @param keyLengthLimit - maximum char size of all string keys (default 128 chars) | ||
*/ | ||
setMaxKeyLength(keyLengthLimit: number) : CountlyConfigSDKInternalLimits; | ||
/** | ||
* Limits the size of all values in segmentation key-value pairs | ||
* @param valueSizeLimit - the maximum char size of all values in our key-value pairs (default 256 chars) | ||
*/ | ||
setMaxValueSize(valueSizeLimit: number) : CountlyConfigSDKInternalLimits; | ||
/** | ||
* Limits the max amount of custom segmentation in one event | ||
* @param segmentationAmountLimit - the maximum amount of custom segmentation in one event (default 100 key-value pairs) | ||
*/ | ||
setMaxSegmentationValues(segmentationAmountLimit: number) : CountlyConfigSDKInternalLimits; | ||
/** | ||
* Limits the max amount of breadcrumbs that can be recorded before the oldest one is deleted | ||
* @param breadcrumbCountLimit - the maximum amount of breadcrumbs that can be recorded before the oldest one is deleted (default 100) | ||
*/ | ||
setMaxBreadcrumbCount(breadcrumbCountLimit: number) : CountlyConfigSDKInternalLimits; | ||
/** | ||
* Limits the max amount of stack trace lines to be recorded per thread | ||
* @param stackTraceLinesPerThreadLimit - maximum amount of stack trace lines to be recorded per thread (default 30) | ||
*/ | ||
setMaxStackTraceLinesPerThread(stackTraceLinesPerThreadLimit: number) : CountlyConfigSDKInternalLimits; | ||
/** | ||
* Limits the max characters allowed per stack trace lines. Also limits the crash message length | ||
* @param stackTraceLineLengthLimit - maximum length of each stack trace line (default 200) | ||
*/ | ||
setMaxStackTraceLineLength(stackTraceLineLengthLimit: number) : CountlyConfigSDKInternalLimits; | ||
} | ||
/** | ||
@@ -1150,2 +1188,6 @@ * | ||
apm: CountlyConfigApm; | ||
/** | ||
* getter for CountlySDKLimits instance that is used to access CountlyConfigSDKInternalLimits methods | ||
*/ | ||
sdkInternalLimits: CountlyConfigSDKInternalLimits; | ||
@@ -1152,0 +1194,0 @@ /** |
import { initialize } from "./Logger.js"; | ||
import CountlyConfigApm from "./lib/configuration_interfaces/countly_config_apm.js"; | ||
import CountlyConfigSDKInternalLimits from "./lib/configuration_interfaces/countly_config_limits.js"; | ||
/** | ||
@@ -21,2 +22,3 @@ * Countly SDK React Native Bridge | ||
this._countlyConfigApmInstance = new CountlyConfigApm(); | ||
this._countlyConfigSDKLimitsInstance = new CountlyConfigSDKInternalLimits(); | ||
} | ||
@@ -31,2 +33,6 @@ | ||
get sdkInternalLimits() { | ||
return this._countlyConfigSDKLimitsInstance; | ||
} | ||
/** | ||
@@ -33,0 +39,0 @@ * Method to set the server url |
@@ -0,1 +1,12 @@ | ||
## 24.4.1 | ||
* Added support for Feedback Widget terms and conditions | ||
* Mitigated an issue where SDK limits could affect internal keys | ||
* Mitigated an issue that enabled recording reserved events | ||
* Mitigated an issue where timed events could have no ID | ||
* Mitigated an issue where internal limits were not being applied to some values | ||
* Mitigated an issue where the request queue could overflow while sending a request | ||
* Removed timestamps from crash breadcrumbs | ||
## 24.4.0 | ||
@@ -2,0 +13,0 @@ * Added `attemptToSendStoredRequests` method to combine all events in event queue into a request and attempt to process stored requests |
{ | ||
"name": "countly-sdk-react-native-bridge", | ||
"version": "24.4.0", | ||
"version": "24.4.1", | ||
"author": "Countly <hello@count.ly> (https://count.ly/)", | ||
@@ -5,0 +5,0 @@ "bugs": { |
70
Utils.js
@@ -20,15 +20,15 @@ import * as L from "./Logger.js"; | ||
switch (deviceIdType) { | ||
case 10101: | ||
result = DeviceIdType.SDK_GENERATED; | ||
break; | ||
case 20202: | ||
result = DeviceIdType.DEVELOPER_SUPPLIED; | ||
break; | ||
case 30303: | ||
result = DeviceIdType.TEMPORARY_ID; | ||
break; | ||
default: | ||
L.e("_getDeviceIdType, " + `unexpected deviceIdType [${deviceIdType}] from native side`); | ||
result = DeviceIdType.SDK_GENERATED; | ||
break; | ||
case 10101: | ||
result = DeviceIdType.SDK_GENERATED; | ||
break; | ||
case 20202: | ||
result = DeviceIdType.DEVELOPER_SUPPLIED; | ||
break; | ||
case 30303: | ||
result = DeviceIdType.TEMPORARY_ID; | ||
break; | ||
default: | ||
L.e("_getDeviceIdType, " + `unexpected deviceIdType [${deviceIdType}] from native side`); | ||
result = DeviceIdType.SDK_GENERATED; | ||
break; | ||
} | ||
@@ -138,2 +138,46 @@ L.d(`_getDeviceIdType, DeviceIDType: ${result}`); | ||
} | ||
// Limits ----------------------------------------------- | ||
if (config.sdkInternalLimits.maxKeyLength) { | ||
if (config.sdkInternalLimits.maxKeyLength < 1) { | ||
L.w(`configToJson, Provided value for maxKeyLength is invalid!`) | ||
} else { | ||
json.maxKeyLength = config.sdkInternalLimits.maxKeyLength; | ||
} | ||
} | ||
if (config.sdkInternalLimits.maxValueSize) { | ||
if (config.sdkInternalLimits.maxValueSize < 1) { | ||
L.w(`configToJson, Provided value for maxValueSize is invalid!`) | ||
} else { | ||
json.maxValueSize = config.sdkInternalLimits.maxValueSize; | ||
} | ||
} | ||
if (config.sdkInternalLimits.maxSegmentationValues) { | ||
if (config.sdkInternalLimits.maxSegmentationValues < 1) { | ||
L.w(`configToJson, Provided value for maxSegmentationValues is invalid!`) | ||
} else { | ||
json.maxSegmentationValues = config.sdkInternalLimits.maxSegmentationValues; | ||
} | ||
} | ||
if (config.sdkInternalLimits.maxBreadcrumbCount) { | ||
if (config.sdkInternalLimits.maxBreadcrumbCount < 1) { | ||
L.w(`configToJson, Provided value for maxBreadcrumbCount is invalid!`) | ||
} else { | ||
json.maxBreadcrumbCount = config.sdkInternalLimits.maxBreadcrumbCount; | ||
} | ||
} | ||
if (config.sdkInternalLimits.maxStackTraceLinesPerThread) { | ||
if (config.sdkInternalLimits.maxStackTraceLinesPerThread < 1) { | ||
L.w(`configToJson, Provided value for maxStackTraceLinesPerThread is invalid!`) | ||
} else { | ||
json.maxStackTraceLinesPerThread = config.sdkInternalLimits.maxStackTraceLinesPerThread; | ||
} | ||
} | ||
if (config.sdkInternalLimits.maxStackTraceLineLength) { | ||
if (config.sdkInternalLimits.maxStackTraceLineLength < 1) { | ||
L.w(`configToJson, Provided value for maxStackTraceLineLength is invalid!`) | ||
} else { | ||
json.maxStackTraceLineLength = config.sdkInternalLimits.maxStackTraceLineLength; | ||
} | ||
} | ||
// Limits End -------------------------------------------- | ||
} catch (err) { | ||
@@ -140,0 +184,0 @@ L.e(`configToJson, Exception occured during converting config to json.${err.toString()}`); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1102075
162
7726