From 399bf38101b82efe5f07eea767ec0d15992fadb1 Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray Date: Fri, 19 Jan 2024 12:18:21 +0300 Subject: [PATCH 1/6] feat: new apm configs --- .../count/android/sdk/CountlyConfigTests.java | 16 +++--- .../java/ly/count/android/sdk/ApmConfig.java | 56 +++++++++++++++++++ .../ly/count/android/sdk/CountlyConfig.java | 29 +++++----- .../java/ly/count/android/sdk/ModuleAPM.java | 51 ++++++++++++----- 4 files changed, 117 insertions(+), 35 deletions(-) create mode 100644 sdk/src/main/java/ly/count/android/sdk/ApmConfig.java diff --git a/sdk/src/androidTest/java/ly/count/android/sdk/CountlyConfigTests.java b/sdk/src/androidTest/java/ly/count/android/sdk/CountlyConfigTests.java index f81d6ed21..b3653aae4 100644 --- a/sdk/src/androidTest/java/ly/count/android/sdk/CountlyConfigTests.java +++ b/sdk/src/androidTest/java/ly/count/android/sdk/CountlyConfigTests.java @@ -199,16 +199,16 @@ public boolean filterCrash(String crash) { Assert.assertTrue(config.starRatingShownAutomatically); Assert.assertTrue(config.starRatingDisableAskingForEachAppVersion); Assert.assertEquals(app, config.application); - Assert.assertTrue(config.recordAppStartTime); + Assert.assertTrue(config.apm.trackAppStartTime); Assert.assertTrue(config.disableLocation); Assert.assertEquals("CC", config.locationCountyCode); Assert.assertEquals("city", config.locationCity); Assert.assertEquals("loc", config.locationLocation); Assert.assertEquals("ip", config.locationIpAddress); Assert.assertEquals(metricOverride, config.metricOverride); - Assert.assertEquals((Long) 123l, config.appStartTimestampOverride); - Assert.assertTrue(config.appLoadedManualTrigger); - Assert.assertTrue(config.manualForegroundBackgroundTrigger); + Assert.assertEquals((Long) 123l, config.apm.appStartTimestampOverride); + Assert.assertTrue(config.apm.appLoadedManualTrigger); + Assert.assertTrue(config.apm.manualForegroundBackgroundTrigger); Assert.assertEquals(logCallback, config.providedLogCallback); config.setLocation("CC", "city", "loc", "ip"); @@ -272,16 +272,16 @@ void assertDefaultValues(CountlyConfig config, boolean includeConstructorValues) Assert.assertFalse(config.starRatingDialogIsCancellable); Assert.assertFalse(config.starRatingShownAutomatically); Assert.assertFalse(config.starRatingDisableAskingForEachAppVersion); - Assert.assertFalse(config.recordAppStartTime); + Assert.assertFalse(config.apm.trackAppStartTime); Assert.assertFalse(config.disableLocation); Assert.assertNull(config.locationCountyCode); Assert.assertNull(config.locationCity); Assert.assertNull(config.locationLocation); Assert.assertNull(config.locationIpAddress); Assert.assertNull(config.metricOverride); - Assert.assertNull(config.appStartTimestampOverride); - Assert.assertFalse(config.appLoadedManualTrigger); - Assert.assertFalse(config.manualForegroundBackgroundTrigger); + Assert.assertNull(config.apm.appStartTimestampOverride); + Assert.assertFalse(config.apm.appLoadedManualTrigger); + Assert.assertFalse(config.apm.manualForegroundBackgroundTrigger); Assert.assertNull(config.providedLogCallback); } } diff --git a/sdk/src/main/java/ly/count/android/sdk/ApmConfig.java b/sdk/src/main/java/ly/count/android/sdk/ApmConfig.java new file mode 100644 index 000000000..925366e58 --- /dev/null +++ b/sdk/src/main/java/ly/count/android/sdk/ApmConfig.java @@ -0,0 +1,56 @@ +package ly.count.android.sdk; + +public class ApmConfig { + protected boolean trackAppStartTime = false; + protected boolean trackForegroundBackground = false; + protected boolean manualForegroundBackgroundTrigger = false; + protected boolean appLoadedManualTrigger = false; + protected Long appStartTimestampOverride = null; + + //we enable features + + /** + * Enable the recording of the app start time + * + * @param trackAppStartTime set true if you want to enable the recording of the app start time + * @return Returns the same config object for convenient linking + */ + public synchronized ApmConfig enableAppStartTimeTracking(boolean trackAppStartTime) { + this.trackAppStartTime = trackAppStartTime; + return this; + } + + /** + * Enable the recording of the app foreground / background state + * + * @param trackForegroundBackground set true if you want to enable the recording of the app foreground / background state + * @return Returns the same config object for convenient linking + */ + public synchronized ApmConfig enableForegroundBackgroundTracking(boolean trackForegroundBackground) { + this.trackForegroundBackground = trackForegroundBackground; + return this; + } + + //we configure features / set manual overrides + + /** + * Set to manually trigger the moment when the app has finished loading + * + * @return Returns the same config object for convenient linking + */ + public synchronized ApmConfig enableManualAppLoadedTrigger() { + appLoadedManualTrigger = true; + return this; + } + + /** + * Override the app start timestamp in case you have a more precise way to measure it + * + * @param appStartTimestampOverride The timestamp to use as the app start timestamp + * @return Returns the same config object for convenient linking + */ + public synchronized ApmConfig setAppStartTimestampOverride(long appStartTimestampOverride) { + this.appStartTimestampOverride = appStartTimestampOverride; + return this; + } +} diff --git a/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java b/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java index 07b8b614b..fdb1867fc 100644 --- a/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java +++ b/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java @@ -178,8 +178,6 @@ public class CountlyConfig { protected Application application = null; - protected boolean recordAppStartTime = false; - boolean disableLocation = false; String locationCountyCode = null; @@ -192,12 +190,6 @@ public class CountlyConfig { Map metricOverride = null; - Long appStartTimestampOverride = null; - - boolean appLoadedManualTrigger = false; - - boolean manualForegroundBackgroundTrigger = false; - int maxRequestQueueSize = 1000; ModuleLog.LogCallback providedLogCallback; @@ -884,11 +876,12 @@ public synchronized CountlyConfig setApplication(Application application) { /** * Enable the recording of the app start time * - * @param recordAppStartTime + * @param recordAppStartTime set true if you want to enable the recording of the app start time * @return Returns the same config object for convenient linking + * @deprecated this call is deprecated, use
apm.enableAppStartTracking()
instead */ public synchronized CountlyConfig setRecordAppStartTime(boolean recordAppStartTime) { - this.recordAppStartTime = recordAppStartTime; + apm.enableAppStartTimeTracking(recordAppStartTime); return this; } @@ -933,11 +926,12 @@ public synchronized CountlyConfig setMetricOverride(Map provided /** * Override the app start timestamp in case you have a more precise way to measure it * - * @param appStartTimestampOverride + * @param appStartTimestampOverride The timestamp to use as the app start timestamp * @return Returns the same config object for convenient linking + * @deprecated this call is deprecated, use
apm.setAppStartTimestampOverride()
instead */ public synchronized CountlyConfig setAppStartTimestampOverride(long appStartTimestampOverride) { - this.appStartTimestampOverride = appStartTimestampOverride; + apm.setAppStartTimestampOverride(appStartTimestampOverride); return this; } @@ -945,9 +939,10 @@ public synchronized CountlyConfig setAppStartTimestampOverride(long appStartTime * Set to manually trigger the moment when the app has finished loading * * @return Returns the same config object for convenient linking + * @deprecated this call is deprecated, use
apm.enableManualAppLoadedTrigger()
instead */ public synchronized CountlyConfig enableManualAppLoadedTrigger() { - appLoadedManualTrigger = true; + apm.enableManualAppLoadedTrigger(); return this; } @@ -955,9 +950,10 @@ public synchronized CountlyConfig enableManualAppLoadedTrigger() { * Set this in case you want to control these triggers manually * * @return Returns the same config object for convenient linking + * @deprecated this call is deprecated and will be removed in the future */ public synchronized CountlyConfig enableManualForegroundBackgroundTriggerAPM() { - manualForegroundBackgroundTrigger = true; + apm.manualForegroundBackgroundTrigger = true; return this; } @@ -1047,4 +1043,9 @@ protected synchronized CountlyConfig disableHealthCheck() { healthCheckEnabled = false; return this; } + + /** + * APM configuration interface to be used with CountlyConfig + */ + public final ApmConfig apm = new ApmConfig(); } diff --git a/sdk/src/main/java/ly/count/android/sdk/ModuleAPM.java b/sdk/src/main/java/ly/count/android/sdk/ModuleAPM.java index b28b90b72..70fd03d64 100644 --- a/sdk/src/main/java/ly/count/android/sdk/ModuleAPM.java +++ b/sdk/src/main/java/ly/count/android/sdk/ModuleAPM.java @@ -24,10 +24,10 @@ public class ModuleAPM extends ModuleBase { int activitiesOpen; - boolean useManualAppLoadedTrigger = false; + boolean useManualAppLoadedTrigger; long appStartTimestamp; - - boolean manualForegroundBackgroundTriggers = false; + boolean manualForegroundBackgroundTriggers; + boolean trackForegroundBackground; boolean manualOverrideInForeground = false;//app starts in background ModuleAPM(Countly cly, CountlyConfig config) { @@ -39,10 +39,10 @@ public class ModuleAPM extends ModuleBase { activitiesOpen = 0; - useManualAppLoadedTrigger = config.appLoadedManualTrigger; - if (config.appStartTimestampOverride != null) { + useManualAppLoadedTrigger = config.apm.appLoadedManualTrigger; + if (config.apm.appStartTimestampOverride != null) { //if there is a app start time override, use it - appStartTimestamp = config.appStartTimestampOverride; + appStartTimestamp = config.apm.appStartTimestampOverride; L.d("[ModuleAPM] Using app start timestamp override"); } else { @@ -50,15 +50,20 @@ public class ModuleAPM extends ModuleBase { appStartTimestamp = Countly.applicationStart; } - if (config.appLoadedManualTrigger) { + if (config.apm.appLoadedManualTrigger) { L.d("[ModuleAPM] Using manual app finished loading trigger for app start"); } - manualForegroundBackgroundTriggers = config.manualForegroundBackgroundTrigger; + manualForegroundBackgroundTriggers = config.apm.manualForegroundBackgroundTrigger; if (manualForegroundBackgroundTriggers) { L.d("[ModuleAPM] Using manual foreground/background triggers"); } + trackForegroundBackground = config.apm.trackForegroundBackground; + if (trackForegroundBackground) { + L.d("[ModuleAPM] tracking foreground/background is enabled"); + } + apmInterface = new Apm(); } @@ -332,7 +337,7 @@ void clearNetworkTraces() { void recordAppStart(long appLoadedTimestamp) { L.d("[ModuleAPM] Calling 'recordAppStart'"); - if (_cly.config_.recordAppStartTime) { + if (_cly.config_.apm.trackAppStartTime) { long durationMs = appLoadedTimestamp - appStartTimestamp; if (durationMs <= 0) { @@ -418,7 +423,7 @@ void callbackOnActivityResumed(Activity activity) { long currentTimestamp = System.currentTimeMillis(); - if (!manualForegroundBackgroundTriggers) { + if (trackForegroundBackground && !manualForegroundBackgroundTriggers) { calculateAppRunningTimes(activitiesOpen, activitiesOpen + 1); } activitiesOpen++; @@ -440,7 +445,7 @@ void callbackOnActivityResumed(Activity activity) { void callbackOnActivityStopped(Activity activity) { L.d("[Apm] Calling 'callbackOnActivityStopped', [" + activitiesOpen + "] -> [" + (activitiesOpen - 1) + "]"); - if (!manualForegroundBackgroundTriggers) { + if (trackForegroundBackground & !manualForegroundBackgroundTriggers) { calculateAppRunningTimes(activitiesOpen, activitiesOpen - 1); } activitiesOpen--; @@ -460,7 +465,7 @@ void onConsentChanged(@NonNull final List consentChangeDelta, final bool @Override void initFinished(@NonNull CountlyConfig config) { // we only do this adjustment if we track it automatically - if (!manualForegroundBackgroundTriggers && _cly.lifecycleStateAtLeastStarted()) { + if (trackForegroundBackground && !manualForegroundBackgroundTriggers && _cly.lifecycleStateAtLeastStarted()) { L.d("[ModuleAPM] SDK detects that the app is in the foreground. Increasing the activity counter."); calculateAppRunningTimes(activitiesOpen, activitiesOpen + 1); @@ -583,10 +588,20 @@ public void setAppIsLoaded() { } } + /** + * Manually trigger that the app has gone to the foreground + * + * @deprecated this call is deprecated and will be removed in the future + */ public void triggerForeground() { synchronized (_cly) { L.i("[Apm] Calling 'triggerForeground'"); + if (!trackForegroundBackground) { + L.w("[Apm] triggerForeground, tracking foreground is disabled"); + return; + } + if (!manualForegroundBackgroundTriggers) { L.w("[Apm] trying to use manual foreground triggers without enabling them"); return; @@ -596,12 +611,22 @@ public void triggerForeground() { } } + /** + * Manually trigger that the app has gone to the background + * + * @deprecated this call is deprecated and will be removed in the future + */ public void triggerBackground() { synchronized (_cly) { L.i("[Apm] Calling 'triggerBackground'"); + if (!trackForegroundBackground) { + L.w("[Apm] triggerBackground, tracking background is disabled"); + return; + } + if (!manualForegroundBackgroundTriggers) { - L.w("[Apm] trying to use manual background triggers without enabling them"); + L.w("[Apm] triggerBackground, trying to use manual background triggers without enabling them"); return; } From 6c8ed76d959c2b41d430c0fbb2fc26cdf36047de Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray Date: Fri, 19 Jan 2024 12:31:47 +0300 Subject: [PATCH 2/6] feat: update changelog --- CHANGELOG.md | 121 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 99 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5c27dd59..6e90f40f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,27 @@ +## 24.1.0 + +* Added a way to enable tracking of foreground and background reporting for APM +* Deprecated the following calls from "Apm" interface: + * "triggerBackground" + * "triggerForeground" +* Deprecated following functions from "CountlyConfig": + * "setRecordAppStartTime" instead use "apm.enableAppStartTimeTracking" + * "setAppStartTimestampOverride" instead use "apm.setAppStartTimestampOverride" + * "enableManualAppLoadedTrigger" instead use "apm.enableManualAppLoadedTrigger" + * "enableManualForegroundBackgroundTriggerAPM" will be deleted in the future + ## 23.12.0 + * Mitigated a rare issue related to handling request headers * Added 'addSegmentationToViewWithID' method for adding segmentation to an ongoing view * Added 'addSegmentationToViewWithName' method for adding segmentation to an ongoing view - + ## 23.8.4 + * Mitigated an issue where the device ID was changed after exiting an AB experiment ## 23.8.3 + * Added a config method to set a time limit after which the requests would be removed if not sent to the server: 'setRequestDropAgeHours' * Added a call to enroll users to A/B tests when getting a remote config value: 'getValueAndEnroll' * Added a call to enroll users to A/B tests when getting all remote config values: 'getAllValuesAndEnroll' @@ -18,14 +33,17 @@ * Mitigated an issue where users could not exit from A/B tests if removal request has failed ## 23.8.2 + * Fixed APM bug where automatic foreground, background tracking would track wrong if the SDK was not initialized while the app was not in the foreground ## 23.8.1 + * Adding an additional testing call for retrieving AB test experiment information ## 23.8.0 + * ! Minor breaking change ! Manual view recording calls are now ignored when in automatic view recording mode. -* ! Minor breaking change ! If a manual session is already started, it will not be possible to call "BeginSession" without stopping the previous one +* ! Minor breaking change ! If a manual session is already started, it will not be possible to call "BeginSession" without stopping the previous one * ! Minor breaking change ! If a manual session has not been started, it will not be possible to call "UpdateSession" * ! Minor breaking change ! If a manual session has not been started, it will not be possible to call "EndSession" * ! Minor breaking change ! If Application class is provided, the SDK will use the Application Activity lifecycle callbacks to react to "onStart", "onStop" and "onConfigurationChanged" callbacks. The manual calls will be ignored. @@ -39,9 +57,9 @@ * Push messaging mode is not reported anymore. Related calls have been deprecated. * Deprecated the following calls: - * Countly.sharedInstance().views().recordView(viewName) - * Countly.sharedInstance().views().recordView(viewName, viewSegmentation) - * Countly.sharedInstance().views().isAutomaticViewTrackingEnabled() + * Countly.sharedInstance().views().recordView(viewName) + * Countly.sharedInstance().views().recordView(viewName, viewSegmentation) + * Countly.sharedInstance().views().isAutomaticViewTrackingEnabled() * Deprecated the init time configuration of 'setViewTracking(enable)'. Introduced replacement 'enableAutomaticViewTracking()' * Deprecated the init time configuration of 'setAutoTrackingUseShortName(enable)'. Introduced replacement 'enableAutomaticViewShortNames()' @@ -49,6 +67,7 @@ * Deprecated the init time configuration of 'setAutoTrackingExceptions(exceptions)'. Introduced replacement 'setAutomaticViewTrackingExclusions(exclusions)' ## 23.6.0 + * !! Major breaking change !! Automatically downloaded remote config values will no longer be automatically enrolled in their AB tests. * ! Minor breaking change ! Remote config will now return previously downloaded values when remote-config consent is not given @@ -76,20 +95,23 @@ * Removed the deprecated function "CountlyConfig.setRemoteConfigAutomaticDownload(enabled, callback)" * Removed the deprecated user profile interface accessed on "Countly.userData" - ## 22.09.4 + * Added server side configuration functionality. This is an experimental feature. * Default max segmentation value count changed from 30 to 100 * Fixing bug that prevented device ID to be changed when there is no consent given ## 22.09.3 + * Added "previous event ID" logic for non-internal events ## 22.09.2 + * Deprecated the init time configuration of 'setEnableAttribution' * Session update interval upper limit (10 minutes) has been lifted ## 22.09.1 + * Fixed a bug where metric override values were not applying to crash metrics * Fixed a bug where crash metrics sent the "manufacturer" value under the wrong key * Fixed a bug where orientation events would have the same view ID as the previous view event @@ -97,6 +119,7 @@ * Fixed a bug where view ID's were being reported incorrectly ## 22.09.0 + * Fixed a race condition bug where a recorded event would have the wrong user properties in the drill database on the server. Now event queue is emptied (formed into a request) before recording any user profile changes. * Events are now recorded with an internal ID. * Added a variant of "esWriteCachesToPersistence" that has a callback to indicate if any writes were performed @@ -105,13 +128,16 @@ * Added functionality to access tags for feedback widgets. ## 22.06.2 -* Fixed a bug that would throw a null pointer exception when calling "CountlyPush.displayNotification " and CountlyPush was not initialized + +* Fixed a bug that would throw a null pointer exception when calling "CountlyPush.displayNotification " and CountlyPush was not initialized ## 22.06.1 -* Fixed a bug that would throw a null pointer exception when calling "CountlyPush.onTokenRefresh" and CountlyPush was not initialized + +* Fixed a bug that would throw a null pointer exception when calling "CountlyPush.onTokenRefresh" and CountlyPush was not initialized ## 22.06.0 -* Fatal crash reports will now be written in sync mode to shared preferences + +* Fatal crash reports will now be written in sync mode to shared preferences * Added explicit storage mode where the event queue and request queue are not written to persistent storage until a signal is given * Added mitigations for rare crashes while updating remote config values @@ -121,28 +147,35 @@ * Removed the deprecated "setLocation" method ## 22.02.3 + * Added CountlyConfigPush object which is used during CountlyPush init. * Added a way to add allowed package names for push notification intent security. * Added a way to add allowed class names for push notification intent security. ## 22.02.2 + * Added ability to record direct requests. ## 22.02.1 + * Fixed bug that would be opening two intents for MainActivity when clicking on a push notification with a deep-link. ## 22.02.0 + * Fixed notification trampoline restrictions in Android 12 using reverse activity trampolining implementation. * Adding a call to provide user properties during initialization. ## 21.11.2 -* Fixed bug that caused crashes when migrating from older versions that don't have a device ID type stored. When migrating from no device ID and no type, SDK will fall back to a generated ID. -When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SUPPLIED' if a custom ID was provided during init. Otherwise the new type will be 'OPEN_UDID'. Adding handling for additional edge cases. + +* Fixed bug that caused crashes when migrating from older versions that don't have a device ID type stored. When migrating from no device ID and no type, SDK will fall back to a generated ID. + When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SUPPLIED' if a custom ID was provided during init. Otherwise the new type will be 'OPEN_UDID'. Adding handling for additional edge cases. ## 21.11.1 + * Made 'ModuleDeviceId' public so that it would eliminate access issues for kotlin projects. ## 21.11.0 + * !! Major breaking change !! Deprecating "ADVERTISING_ID" as device ID generation strategy. SDK will fall back to 'OPEN_UDID'. All "ADVERTISING_ID" device ID's will have their type changed to "OPEN_UDID". If the device will have a "null" device ID, a random one will be generated. * !! Major breaking change !! Changing device ID without merging will now clear all consent. It has to be given again after this operation. * !! Major breaking change !! Entering temporary ID mode will now clear all consent. It has to be given again after this operation. @@ -151,13 +184,13 @@ When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SU * ! Minor breaking change ! Automatic install referrer attribution in play stores has been removed. A call is added for recording such provided values. * ! Minor breaking change ! Orientation tracking is now enabled by default. Can be turned off during init. * ! Minor breaking change ! A few internal SDK limits are now introduced. The following limits are adjustable at initialization: - * Maximum amount of provided segmentation in now 30 entries by default. - * Maximum amount of breadcrumbs that can be recorded at once is now 100 by default. + * Maximum amount of provided segmentation in now 30 entries by default. + * Maximum amount of breadcrumbs that can be recorded at once is now 100 by default. * Device ID can now be changed when no consent is given * Push notification now display/use the sent badge number. It's visualization depends on the launcher. * Added new calls to report attribution. -* When recording internal events with 'recordEvent', the respective feature consent will now be checked instead of the 'events' consent. +* When recording internal events with 'recordEvent', the respective feature consent will now be checked instead of the 'events' consent. * Consent changes will now send the whole consent state and not just the "delta" * Deprecated old user profile calls. Introduced a new API by which to change them. * Added platform information to push actioned events @@ -217,19 +250,23 @@ When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SU * Removed the deprecated "setLoggingEnabled" method ## 20.11.12 + * Fixed bug due to "CLOSE_SYSTEM_DIALOGS" permission denial * Adding an init time configuration option to set the maximum request queue size * Updating the "compileSdkVersion" and "targetSdkVersion" to "31". * Updating the "buildToolsVersion" to "31.0.0". ## 20.11.11 + * Fixed a bug where events would be sent with a larger delay if SDK callbacks are not called * Fixed a bug where "platform" and "app_version" were provided incorectly when retrieving the feedback widget data ## 20.11.10 + * Fixed bug that would close manually recorded views early when automatic view recording is disabled ## 20.11.9 + * Moving a push related broadcast receiver decleration to the manifest to comply with 'PendingIntent' checks * Fixed issue with star rating lowest allowed value. Changing it from 0 to 1. * Fixed bug that would prevent certain codepath to be executed if the Application class was not provided during init. @@ -238,32 +275,40 @@ When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SU * Printing approximate data usage in logs when sending requests ## 20.11.8 + * Minor tweaks. Changes related to publishing to MavenCentral ## 20.11.7 + * Adding metric for the device manufacturer. * Fixing potential issues by sending all available events before the "end session" request - + ## 20.11.6 + * Fixed init time bug where the context from the provided application class was not used. * Fixed init time bug which happened when location was disabled during init. ## 20.11.5 + * Added option to enable additional push redirection protections ## 20.11.4 + * Added a way to retrieve feedback widget data and manually report them * Fixed bug where network request were retried too soon after a failed request ## 20.11.3 + * Removed thrown exceptions in places where that is possible ## 20.11.2 + * Added SDK log listener * Refactored all logs to use the new logging mechanism * Fixed bug where manual session control calls were working even when not enabled ## 20.11.1 + * Lessened push notification security restrictions * Added a default way to acquire app start timestamp for APM * Added a way to override the current app start timestamp for APM @@ -271,6 +316,7 @@ When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SU * Added manual foreground/background triggers for APM ## 20.11.0 + * !! Consent change !! To record orientation you now need to give "user" consent * !! Consent change !! To use remote config, you now need to give "remote-config" consent * !! Push breaking changes !! Due to a security vulnerability the following permission need to be added to your app manifest: @@ -285,7 +331,7 @@ When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SU * Added call that updates all server requests so that all of them have the currently set appKey * Update breakpad for native exception catching * Symbol upload tool now sends the used breakpad version -* Reworked openID device ID to not be a separate service +* Reworked openID device ID to not be a separate service * Sending device type (phone, tablet, tv) as part of metrics * Reworked location data persistence and when it is sent. It's recommended to recheck your app to see if it's still behaving as expected. * Deprecated CountlyConfig constructor that takes 'Context'. Added new constructor that also takes the Application class instead of 'Context' @@ -299,12 +345,14 @@ When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SU * Fixed init issue where the device ID was not saved and could be changed by changing it's value during next init ## 20.04.5 + * Replacing sha-1 hash with sha-256 hash for requests. * Adding apm calls for cancelTrace, cancelAllTraces, recordNetworkTrace * Adding option to use Huawei push notifications * making tweaks to APM key validation logic ## 20.04.4 + * Adding metric override feature * Adding functionality to override SDK name and SDK version strings * Fixed an issue in the network request retry logic @@ -313,17 +361,21 @@ When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SU * Fixed the sending of empty event collections in cases where event sending was forced. ## 20.04.3 + * Adding fallback cache to CountlyPush for cases where the SDK is not initialised * Fixed bug which happened when consent was required but no consent was provided during init ## 20.04.2 + * Fixed bug where data was not removed from the URL in case of forced http POST * Fixed HTTP post issue with remote config and rating widget ## 20.04.1 + * Changing permissions for modules so that they are accessible from kotlin ## 20.04 + * Adding functionality for filtering crashes * Adding functionality to set segmentation for automatic and manual views * Adding functionality to ignore activities for automatic view tracking @@ -352,15 +404,19 @@ When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SU * Removing deprecated "setUserData" call ## 19.09.3 + * Fixed a bug that did not add the link to the push dialog button. - + ## 19.09.2 + * Fixed a bug that did not add links to push buttons. ## 19.09.1 + * Applying null pointer exception mitigations to immediate request maker. ## 19.09 + * Adding feature to flush all requests in the queue * Adding CountlyConfig object which is used during init * Added call to try to complete stored requests @@ -374,26 +430,32 @@ When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SU * Removing GCM push support ## 19.02.3 + * Adding support for native crash handling and symbolication ## 19.02.2 + * Fixing bug with location data not being erased during begin_session * Fix potential issue with push Activity ## 19.02.1 + * fixing endEvent bug that ignores provided "count" and "sum" values ## 19.02 + * Added remote config * Star rating requests now use the same urlConnection as other requests * Added functionality for adding custom header key/value pairs to every request ## 18.08.1 + * Fixed bug with events getting unrelated segmentation fields added * Added flags to push action intent * Refactored push URL action handling ## 18.08 + * Added functionality for webView user rating popup dialog * Added call for recording unhandled exceptions * Added 10 second delay before merging device Id's @@ -408,64 +470,79 @@ When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SU * Fixed a bug for setting push consent before init ## 18.04 + * Added functionality for GDPR (giving and removing consent for features) * Added separate module for FCM push notifications ## 18.01.2 -* Fixing a crash in messaging because of null context - + +* Fixing a crash in messaging because of null context + ## 18.01.1 + * Fixing small push notification accent color bug -* Properly deleting cached location data +* Properly deleting cached location data * Improving debug and log messages ## 18.01 + * Changes made how location data is passed and handled * Adding option to disable sending of location data (it can be reenabled later) * Adding option to add a large icon and accent color to push notifications * Adding option to add meta information to push notification intents ## 17.09.2 + * Adding option to override the icon for push notifications ## 17.09.1 + * Adding additional calls for manipulating the star rating dialog ## 17.09 + * Fixed app crawler filtering & ANR if substantially changing device date back in time ## 17.05 + * Added Rich Push Notifications support (attachments and custom action buttons) * Added functionality to ignore app crawlers * Added calls to retrieve device ID and ID type * Added call see if onStart has been called at least once ## 16.12.3 + * Adding certificate pinning in addition to public key pinning ## 16.12.02 + * Changing automatic star rating default behaviour (disabling it) * Removing Context as a needed field from some function calls ## 16.12.01 + * Added additional meta data to each API request * Added support for the star rating plugin * Added option to force HTTP POST for all requests * Added support for optional parameters during initialization ## 16.02 + * Views support * User data part updated ## 15.08.01 + * Lowering required API level back to 9 ## 15.08 + * Bug fixes: - * Incorrect handling of empty review message #50 - * Change GCM registration ID whenever sender ID changed #51 + * Incorrect handling of empty review message #50 + * Change GCM registration ID whenever sender ID changed #51 ## 15.06 + * Bug fixes & other improvements * Attribution analytics * Crash reports From 20fd1d58b1999fb3f6410e8c8cfcf4aec5b732f1 Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray Date: Mon, 22 Jan 2024 16:13:19 +0300 Subject: [PATCH 3/6] fix: pr reviews --- CHANGELOG.md | 110 ++++-------------- .../sdk/{ApmConfig.java => ConfigApm.java} | 31 +++-- .../ly/count/android/sdk/CountlyConfig.java | 4 +- 3 files changed, 46 insertions(+), 99 deletions(-) rename sdk/src/main/java/ly/count/android/sdk/{ApmConfig.java => ConfigApm.java} (65%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e90f40f0..049cad4fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,4 @@ ## 24.1.0 - * Added a way to enable tracking of foreground and background reporting for APM * Deprecated the following calls from "Apm" interface: * "triggerBackground" @@ -11,17 +10,14 @@ * "enableManualForegroundBackgroundTriggerAPM" will be deleted in the future ## 23.12.0 - * Mitigated a rare issue related to handling request headers * Added 'addSegmentationToViewWithID' method for adding segmentation to an ongoing view * Added 'addSegmentationToViewWithName' method for adding segmentation to an ongoing view - + ## 23.8.4 - * Mitigated an issue where the device ID was changed after exiting an AB experiment ## 23.8.3 - * Added a config method to set a time limit after which the requests would be removed if not sent to the server: 'setRequestDropAgeHours' * Added a call to enroll users to A/B tests when getting a remote config value: 'getValueAndEnroll' * Added a call to enroll users to A/B tests when getting all remote config values: 'getAllValuesAndEnroll' @@ -33,17 +29,14 @@ * Mitigated an issue where users could not exit from A/B tests if removal request has failed ## 23.8.2 - * Fixed APM bug where automatic foreground, background tracking would track wrong if the SDK was not initialized while the app was not in the foreground ## 23.8.1 - * Adding an additional testing call for retrieving AB test experiment information ## 23.8.0 - * ! Minor breaking change ! Manual view recording calls are now ignored when in automatic view recording mode. -* ! Minor breaking change ! If a manual session is already started, it will not be possible to call "BeginSession" without stopping the previous one +* ! Minor breaking change ! If a manual session is already started, it will not be possible to call "BeginSession" without stopping the previous one * ! Minor breaking change ! If a manual session has not been started, it will not be possible to call "UpdateSession" * ! Minor breaking change ! If a manual session has not been started, it will not be possible to call "EndSession" * ! Minor breaking change ! If Application class is provided, the SDK will use the Application Activity lifecycle callbacks to react to "onStart", "onStop" and "onConfigurationChanged" callbacks. The manual calls will be ignored. @@ -57,9 +50,9 @@ * Push messaging mode is not reported anymore. Related calls have been deprecated. * Deprecated the following calls: - * Countly.sharedInstance().views().recordView(viewName) - * Countly.sharedInstance().views().recordView(viewName, viewSegmentation) - * Countly.sharedInstance().views().isAutomaticViewTrackingEnabled() + * Countly.sharedInstance().views().recordView(viewName) + * Countly.sharedInstance().views().recordView(viewName, viewSegmentation) + * Countly.sharedInstance().views().isAutomaticViewTrackingEnabled() * Deprecated the init time configuration of 'setViewTracking(enable)'. Introduced replacement 'enableAutomaticViewTracking()' * Deprecated the init time configuration of 'setAutoTrackingUseShortName(enable)'. Introduced replacement 'enableAutomaticViewShortNames()' @@ -67,7 +60,6 @@ * Deprecated the init time configuration of 'setAutoTrackingExceptions(exceptions)'. Introduced replacement 'setAutomaticViewTrackingExclusions(exclusions)' ## 23.6.0 - * !! Major breaking change !! Automatically downloaded remote config values will no longer be automatically enrolled in their AB tests. * ! Minor breaking change ! Remote config will now return previously downloaded values when remote-config consent is not given @@ -95,23 +87,20 @@ * Removed the deprecated function "CountlyConfig.setRemoteConfigAutomaticDownload(enabled, callback)" * Removed the deprecated user profile interface accessed on "Countly.userData" -## 22.09.4 +## 22.09.4 * Added server side configuration functionality. This is an experimental feature. * Default max segmentation value count changed from 30 to 100 * Fixing bug that prevented device ID to be changed when there is no consent given ## 22.09.3 - * Added "previous event ID" logic for non-internal events ## 22.09.2 - * Deprecated the init time configuration of 'setEnableAttribution' * Session update interval upper limit (10 minutes) has been lifted ## 22.09.1 - * Fixed a bug where metric override values were not applying to crash metrics * Fixed a bug where crash metrics sent the "manufacturer" value under the wrong key * Fixed a bug where orientation events would have the same view ID as the previous view event @@ -119,7 +108,6 @@ * Fixed a bug where view ID's were being reported incorrectly ## 22.09.0 - * Fixed a race condition bug where a recorded event would have the wrong user properties in the drill database on the server. Now event queue is emptied (formed into a request) before recording any user profile changes. * Events are now recorded with an internal ID. * Added a variant of "esWriteCachesToPersistence" that has a callback to indicate if any writes were performed @@ -128,16 +116,13 @@ * Added functionality to access tags for feedback widgets. ## 22.06.2 - -* Fixed a bug that would throw a null pointer exception when calling "CountlyPush.displayNotification " and CountlyPush was not initialized +* Fixed a bug that would throw a null pointer exception when calling "CountlyPush.displayNotification " and CountlyPush was not initialized ## 22.06.1 - -* Fixed a bug that would throw a null pointer exception when calling "CountlyPush.onTokenRefresh" and CountlyPush was not initialized +* Fixed a bug that would throw a null pointer exception when calling "CountlyPush.onTokenRefresh" and CountlyPush was not initialized ## 22.06.0 - -* Fatal crash reports will now be written in sync mode to shared preferences +* Fatal crash reports will now be written in sync mode to shared preferences * Added explicit storage mode where the event queue and request queue are not written to persistent storage until a signal is given * Added mitigations for rare crashes while updating remote config values @@ -147,35 +132,28 @@ * Removed the deprecated "setLocation" method ## 22.02.3 - * Added CountlyConfigPush object which is used during CountlyPush init. * Added a way to add allowed package names for push notification intent security. * Added a way to add allowed class names for push notification intent security. ## 22.02.2 - * Added ability to record direct requests. ## 22.02.1 - * Fixed bug that would be opening two intents for MainActivity when clicking on a push notification with a deep-link. ## 22.02.0 - * Fixed notification trampoline restrictions in Android 12 using reverse activity trampolining implementation. * Adding a call to provide user properties during initialization. ## 21.11.2 - -* Fixed bug that caused crashes when migrating from older versions that don't have a device ID type stored. When migrating from no device ID and no type, SDK will fall back to a generated ID. - When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SUPPLIED' if a custom ID was provided during init. Otherwise the new type will be 'OPEN_UDID'. Adding handling for additional edge cases. +* Fixed bug that caused crashes when migrating from older versions that don't have a device ID type stored. When migrating from no device ID and no type, SDK will fall back to a generated ID. +When migrating from device ID and no type, SDK will set id type to 'DEVELOPER_SUPPLIED' if a custom ID was provided during init. Otherwise the new type will be 'OPEN_UDID'. Adding handling for additional edge cases. ## 21.11.1 - * Made 'ModuleDeviceId' public so that it would eliminate access issues for kotlin projects. ## 21.11.0 - * !! Major breaking change !! Deprecating "ADVERTISING_ID" as device ID generation strategy. SDK will fall back to 'OPEN_UDID'. All "ADVERTISING_ID" device ID's will have their type changed to "OPEN_UDID". If the device will have a "null" device ID, a random one will be generated. * !! Major breaking change !! Changing device ID without merging will now clear all consent. It has to be given again after this operation. * !! Major breaking change !! Entering temporary ID mode will now clear all consent. It has to be given again after this operation. @@ -184,13 +162,13 @@ * ! Minor breaking change ! Automatic install referrer attribution in play stores has been removed. A call is added for recording such provided values. * ! Minor breaking change ! Orientation tracking is now enabled by default. Can be turned off during init. * ! Minor breaking change ! A few internal SDK limits are now introduced. The following limits are adjustable at initialization: - * Maximum amount of provided segmentation in now 30 entries by default. - * Maximum amount of breadcrumbs that can be recorded at once is now 100 by default. + * Maximum amount of provided segmentation in now 30 entries by default. + * Maximum amount of breadcrumbs that can be recorded at once is now 100 by default. * Device ID can now be changed when no consent is given * Push notification now display/use the sent badge number. It's visualization depends on the launcher. * Added new calls to report attribution. -* When recording internal events with 'recordEvent', the respective feature consent will now be checked instead of the 'events' consent. +* When recording internal events with 'recordEvent', the respective feature consent will now be checked instead of the 'events' consent. * Consent changes will now send the whole consent state and not just the "delta" * Deprecated old user profile calls. Introduced a new API by which to change them. * Added platform information to push actioned events @@ -250,23 +228,19 @@ * Removed the deprecated "setLoggingEnabled" method ## 20.11.12 - * Fixed bug due to "CLOSE_SYSTEM_DIALOGS" permission denial * Adding an init time configuration option to set the maximum request queue size * Updating the "compileSdkVersion" and "targetSdkVersion" to "31". * Updating the "buildToolsVersion" to "31.0.0". ## 20.11.11 - * Fixed a bug where events would be sent with a larger delay if SDK callbacks are not called * Fixed a bug where "platform" and "app_version" were provided incorectly when retrieving the feedback widget data ## 20.11.10 - * Fixed bug that would close manually recorded views early when automatic view recording is disabled ## 20.11.9 - * Moving a push related broadcast receiver decleration to the manifest to comply with 'PendingIntent' checks * Fixed issue with star rating lowest allowed value. Changing it from 0 to 1. * Fixed bug that would prevent certain codepath to be executed if the Application class was not provided during init. @@ -275,40 +249,32 @@ * Printing approximate data usage in logs when sending requests ## 20.11.8 - * Minor tweaks. Changes related to publishing to MavenCentral ## 20.11.7 - * Adding metric for the device manufacturer. * Fixing potential issues by sending all available events before the "end session" request - + ## 20.11.6 - * Fixed init time bug where the context from the provided application class was not used. * Fixed init time bug which happened when location was disabled during init. ## 20.11.5 - * Added option to enable additional push redirection protections ## 20.11.4 - * Added a way to retrieve feedback widget data and manually report them * Fixed bug where network request were retried too soon after a failed request ## 20.11.3 - * Removed thrown exceptions in places where that is possible ## 20.11.2 - * Added SDK log listener * Refactored all logs to use the new logging mechanism * Fixed bug where manual session control calls were working even when not enabled ## 20.11.1 - * Lessened push notification security restrictions * Added a default way to acquire app start timestamp for APM * Added a way to override the current app start timestamp for APM @@ -316,7 +282,6 @@ * Added manual foreground/background triggers for APM ## 20.11.0 - * !! Consent change !! To record orientation you now need to give "user" consent * !! Consent change !! To use remote config, you now need to give "remote-config" consent * !! Push breaking changes !! Due to a security vulnerability the following permission need to be added to your app manifest: @@ -331,7 +296,7 @@ * Added call that updates all server requests so that all of them have the currently set appKey * Update breakpad for native exception catching * Symbol upload tool now sends the used breakpad version -* Reworked openID device ID to not be a separate service +* Reworked openID device ID to not be a separate service * Sending device type (phone, tablet, tv) as part of metrics * Reworked location data persistence and when it is sent. It's recommended to recheck your app to see if it's still behaving as expected. * Deprecated CountlyConfig constructor that takes 'Context'. Added new constructor that also takes the Application class instead of 'Context' @@ -345,14 +310,12 @@ * Fixed init issue where the device ID was not saved and could be changed by changing it's value during next init ## 20.04.5 - * Replacing sha-1 hash with sha-256 hash for requests. * Adding apm calls for cancelTrace, cancelAllTraces, recordNetworkTrace * Adding option to use Huawei push notifications * making tweaks to APM key validation logic ## 20.04.4 - * Adding metric override feature * Adding functionality to override SDK name and SDK version strings * Fixed an issue in the network request retry logic @@ -361,21 +324,17 @@ * Fixed the sending of empty event collections in cases where event sending was forced. ## 20.04.3 - * Adding fallback cache to CountlyPush for cases where the SDK is not initialised * Fixed bug which happened when consent was required but no consent was provided during init ## 20.04.2 - * Fixed bug where data was not removed from the URL in case of forced http POST * Fixed HTTP post issue with remote config and rating widget ## 20.04.1 - * Changing permissions for modules so that they are accessible from kotlin ## 20.04 - * Adding functionality for filtering crashes * Adding functionality to set segmentation for automatic and manual views * Adding functionality to ignore activities for automatic view tracking @@ -404,19 +363,15 @@ * Removing deprecated "setUserData" call ## 19.09.3 - * Fixed a bug that did not add the link to the push dialog button. - + ## 19.09.2 - * Fixed a bug that did not add links to push buttons. ## 19.09.1 - * Applying null pointer exception mitigations to immediate request maker. ## 19.09 - * Adding feature to flush all requests in the queue * Adding CountlyConfig object which is used during init * Added call to try to complete stored requests @@ -430,32 +385,26 @@ * Removing GCM push support ## 19.02.3 - * Adding support for native crash handling and symbolication ## 19.02.2 - * Fixing bug with location data not being erased during begin_session * Fix potential issue with push Activity ## 19.02.1 - * fixing endEvent bug that ignores provided "count" and "sum" values ## 19.02 - * Added remote config * Star rating requests now use the same urlConnection as other requests * Added functionality for adding custom header key/value pairs to every request ## 18.08.1 - * Fixed bug with events getting unrelated segmentation fields added * Added flags to push action intent * Refactored push URL action handling ## 18.08 - * Added functionality for webView user rating popup dialog * Added call for recording unhandled exceptions * Added 10 second delay before merging device Id's @@ -470,79 +419,64 @@ * Fixed a bug for setting push consent before init ## 18.04 - * Added functionality for GDPR (giving and removing consent for features) * Added separate module for FCM push notifications ## 18.01.2 - -* Fixing a crash in messaging because of null context - +* Fixing a crash in messaging because of null context + ## 18.01.1 - * Fixing small push notification accent color bug -* Properly deleting cached location data +* Properly deleting cached location data * Improving debug and log messages ## 18.01 - * Changes made how location data is passed and handled * Adding option to disable sending of location data (it can be reenabled later) * Adding option to add a large icon and accent color to push notifications * Adding option to add meta information to push notification intents ## 17.09.2 - * Adding option to override the icon for push notifications ## 17.09.1 - * Adding additional calls for manipulating the star rating dialog ## 17.09 - * Fixed app crawler filtering & ANR if substantially changing device date back in time ## 17.05 - * Added Rich Push Notifications support (attachments and custom action buttons) * Added functionality to ignore app crawlers * Added calls to retrieve device ID and ID type * Added call see if onStart has been called at least once ## 16.12.3 - * Adding certificate pinning in addition to public key pinning ## 16.12.02 - * Changing automatic star rating default behaviour (disabling it) * Removing Context as a needed field from some function calls ## 16.12.01 - * Added additional meta data to each API request * Added support for the star rating plugin * Added option to force HTTP POST for all requests * Added support for optional parameters during initialization ## 16.02 - * Views support * User data part updated ## 15.08.01 - * Lowering required API level back to 9 ## 15.08 - * Bug fixes: - * Incorrect handling of empty review message #50 - * Change GCM registration ID whenever sender ID changed #51 + * Incorrect handling of empty review message #50 + * Change GCM registration ID whenever sender ID changed #51 ## 15.06 - * Bug fixes & other improvements * Attribution analytics * Crash reports diff --git a/sdk/src/main/java/ly/count/android/sdk/ApmConfig.java b/sdk/src/main/java/ly/count/android/sdk/ConfigApm.java similarity index 65% rename from sdk/src/main/java/ly/count/android/sdk/ApmConfig.java rename to sdk/src/main/java/ly/count/android/sdk/ConfigApm.java index 925366e58..605003886 100644 --- a/sdk/src/main/java/ly/count/android/sdk/ApmConfig.java +++ b/sdk/src/main/java/ly/count/android/sdk/ConfigApm.java @@ -1,10 +1,25 @@ package ly.count.android.sdk; -public class ApmConfig { +public class ConfigApm { + /** + * Whether to track the app start time + */ protected boolean trackAppStartTime = false; + /** + * Whether to track the app foreground / background state + */ protected boolean trackForegroundBackground = false; + /** + * Whether to track the app foreground / background state manually + */ protected boolean manualForegroundBackgroundTrigger = false; + /** + * Whether to track the app start time manually + */ protected boolean appLoadedManualTrigger = false; + /** + * Whether to track the app start time manually + */ protected Long appStartTimestampOverride = null; //we enable features @@ -12,22 +27,20 @@ public class ApmConfig { /** * Enable the recording of the app start time * - * @param trackAppStartTime set true if you want to enable the recording of the app start time * @return Returns the same config object for convenient linking */ - public synchronized ApmConfig enableAppStartTimeTracking(boolean trackAppStartTime) { - this.trackAppStartTime = trackAppStartTime; + public synchronized ConfigApm enableAppStartTimeTracking() { + this.trackAppStartTime = true; return this; } /** * Enable the recording of the app foreground / background state * - * @param trackForegroundBackground set true if you want to enable the recording of the app foreground / background state * @return Returns the same config object for convenient linking */ - public synchronized ApmConfig enableForegroundBackgroundTracking(boolean trackForegroundBackground) { - this.trackForegroundBackground = trackForegroundBackground; + public synchronized ConfigApm enableForegroundBackgroundTracking() { + this.trackForegroundBackground = true; return this; } @@ -38,7 +51,7 @@ public synchronized ApmConfig enableForegroundBackgroundTracking(boolean trackFo * * @return Returns the same config object for convenient linking */ - public synchronized ApmConfig enableManualAppLoadedTrigger() { + public synchronized ConfigApm enableManualAppLoadedTrigger() { appLoadedManualTrigger = true; return this; } @@ -49,7 +62,7 @@ public synchronized ApmConfig enableManualAppLoadedTrigger() { * @param appStartTimestampOverride The timestamp to use as the app start timestamp * @return Returns the same config object for convenient linking */ - public synchronized ApmConfig setAppStartTimestampOverride(long appStartTimestampOverride) { + public synchronized ConfigApm setAppStartTimestampOverride(long appStartTimestampOverride) { this.appStartTimestampOverride = appStartTimestampOverride; return this; } diff --git a/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java b/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java index fdb1867fc..33f929824 100644 --- a/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java +++ b/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java @@ -881,7 +881,7 @@ public synchronized CountlyConfig setApplication(Application application) { * @deprecated this call is deprecated, use
apm.enableAppStartTracking()
instead */ public synchronized CountlyConfig setRecordAppStartTime(boolean recordAppStartTime) { - apm.enableAppStartTimeTracking(recordAppStartTime); + apm.trackAppStartTime = recordAppStartTime; return this; } @@ -1047,5 +1047,5 @@ protected synchronized CountlyConfig disableHealthCheck() { /** * APM configuration interface to be used with CountlyConfig */ - public final ApmConfig apm = new ApmConfig(); + public final ConfigApm apm = new ConfigApm(); } From 5ba782f285b931cffe26d02f23eba9c898bd1bb6 Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray <57103426+arifBurakDemiray@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:42:23 +0300 Subject: [PATCH 4/6] Update CHANGELOG.md --- CHANGELOG.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 049cad4fc..a362d6a05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,16 @@ ## 24.1.0 +* ! Minor breaking change ! Tracking of foreground and background reporting for APM is disabled by default + * Added a way to enable tracking of foreground and background reporting for APM + * Deprecated the following calls from "Apm" interface: * "triggerBackground" * "triggerForeground" * Deprecated following functions from "CountlyConfig": - * "setRecordAppStartTime" instead use "apm.enableAppStartTimeTracking" - * "setAppStartTimestampOverride" instead use "apm.setAppStartTimestampOverride" - * "enableManualAppLoadedTrigger" instead use "apm.enableManualAppLoadedTrigger" - * "enableManualForegroundBackgroundTriggerAPM" will be deleted in the future + * "setRecordAppStartTime(boolean recordAppStartTime)" instead use "apm.enableAppStartTimeTracking()" + * "setAppStartTimestampOverride(long appStartTimestampOverride)" instead use "apm.setAppStartTimestampOverride(long appStartTimestampOverride)" + * "enableManualAppLoadedTrigger()" instead use "apm.enableManualAppLoadedTrigger()" + * "enableManualForegroundBackgroundTriggerAPM()" will be deleted in the future ## 23.12.0 * Mitigated a rare issue related to handling request headers From 7f97db3665f98ec96ab0bbd79e5b9637a95056da Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray <57103426+arifBurakDemiray@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:43:19 +0300 Subject: [PATCH 5/6] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a362d6a05..b34d89ec7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,8 @@ * "triggerBackground" * "triggerForeground" * Deprecated following functions from "CountlyConfig": - * "setRecordAppStartTime(boolean recordAppStartTime)" instead use "apm.enableAppStartTimeTracking()" - * "setAppStartTimestampOverride(long appStartTimestampOverride)" instead use "apm.setAppStartTimestampOverride(long appStartTimestampOverride)" + * "setRecordAppStartTime(recordAppStartTime)" instead use "apm.enableAppStartTimeTracking()" + * "setAppStartTimestampOverride(appStartTimestampOverride)" instead use "apm.setAppStartTimestampOverride(appStartTimestampOverride)" * "enableManualAppLoadedTrigger()" instead use "apm.enableManualAppLoadedTrigger()" * "enableManualForegroundBackgroundTriggerAPM()" will be deleted in the future From 76cd92b60b6950bbef314fda024ce3ad72ff0914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Art=C5=ABrs=20Kadi=C4=B7is?= Date: Tue, 23 Jan 2024 14:44:01 +0200 Subject: [PATCH 6/6] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b34d89ec7..79aef8370 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 24.1.0 +## XX.X.X * ! Minor breaking change ! Tracking of foreground and background reporting for APM is disabled by default * Added a way to enable tracking of foreground and background reporting for APM