From 398951699784b4587fb5c56390cabbef8c4ff93d Mon Sep 17 00:00:00 2001 From: Fiona Date: Sun, 13 Sep 2026 16:20:02 -0700 Subject: [PATCH] =?UTF-8?q?chore(release):=200.6.0=20=E2=80=94=20remote=20?= =?UTF-8?q?configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump the five SDK packages to 0.6.0 in lockstep and record the release in each package's changelog. The RUM package can now read its session sample rate and a custom map from the console. --- flashcat-axios/CHANGELOG.md | 5 ++++ flashcat-axios/oh-package.json5 | 4 +-- flashcat-core/CHANGELOG.md | 11 ++++++++ flashcat-core/oh-package.json5 | 2 +- .../src/main/ets/internal/Version.ets | 2 +- flashcat-crash/CHANGELOG.md | 5 ++++ flashcat-crash/oh-package.json5 | 4 +-- .../src/test/CrashEventMapper.test.ets | 4 +-- .../src/test/CrashIncident.test.ets | 6 ++--- flashcat-rum/CHANGELOG.md | 27 +++++++++++++++++++ flashcat-rum/oh-package.json5 | 4 +-- flashcat-rum/src/test/RemoteConfig.test.ets | 4 +-- .../src/test/SessionLifecycle.test.ets | 2 +- flashcat-trace/CHANGELOG.md | 5 ++++ flashcat-trace/oh-package.json5 | 4 +-- 15 files changed, 71 insertions(+), 18 deletions(-) diff --git a/flashcat-axios/CHANGELOG.md b/flashcat-axios/CHANGELOG.md index 1a0609f..68036f7 100644 --- a/flashcat-axios/CHANGELOG.md +++ b/flashcat-axios/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.6.0 + +- Version bump to keep the SDK packages in lockstep (see `@flashcatcloud/rum` + 0.6.0: remote configuration). + ## 0.5.1 - Version bump to keep the SDK packages in lockstep (see `@flashcatcloud/rum` diff --git a/flashcat-axios/oh-package.json5 b/flashcat-axios/oh-package.json5 index ba62a25..86bcee6 100644 --- a/flashcat-axios/oh-package.json5 +++ b/flashcat-axios/oh-package.json5 @@ -1,13 +1,13 @@ { name: "@flashcatcloud/axios", - version: "0.5.1", + version: "0.6.0", description: "FlashCat HarmonyOS axios integration: reports @ohos/axios requests as RUM resources with distributed-trace headers.", main: "Index.ets", license: "Apache-2.0", author: "FlashCat (https://flashcat.cloud)", repository: "https://github.com/flashcatcloud/fc-sdk-harmony", dependencies: { - "@flashcatcloud/trace": "0.5.1", + "@flashcatcloud/trace": "0.6.0", "@ohos/axios": "^2.2.4" } } diff --git a/flashcat-core/CHANGELOG.md b/flashcat-core/CHANGELOG.md index 76622f2..798de5c 100644 --- a/flashcat-core/CHANGELOG.md +++ b/flashcat-core/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 0.6.0 + +- `SdkCore` gains `getIntakeTarget()`, `readSetting()` and `writeSetting()`, + which feature packages use to call an endpoint of their own and keep small + settings across launches (see `@flashcatcloud/rum` 0.6.0: remote + configuration). + +### Breaking + +- Code that implements `SdkCore` itself needs to add the three methods above. + ## 0.5.1 - Version bump to keep the SDK packages in lockstep (see `@flashcatcloud/rum` diff --git a/flashcat-core/oh-package.json5 b/flashcat-core/oh-package.json5 index 466a2e8..cd493a9 100644 --- a/flashcat-core/oh-package.json5 +++ b/flashcat-core/oh-package.json5 @@ -1,6 +1,6 @@ { name: "@flashcatcloud/core", - version: "0.5.1", + version: "0.6.0", description: "FlashCat HarmonyOS SDK core: init, configuration, context, message bus, storage and batched upload.", main: "Index.ets", license: "Apache-2.0", diff --git a/flashcat-core/src/main/ets/internal/Version.ets b/flashcat-core/src/main/ets/internal/Version.ets index 9124f9d..1180f24 100644 --- a/flashcat-core/src/main/ets/internal/Version.ets +++ b/flashcat-core/src/main/ets/internal/Version.ets @@ -5,4 +5,4 @@ * Keep this in sync with the `version` field of each module's * `oh-package.json5` on every release bump. */ -export const SDK_VERSION: string = '0.5.1'; +export const SDK_VERSION: string = '0.6.0'; diff --git a/flashcat-crash/CHANGELOG.md b/flashcat-crash/CHANGELOG.md index cd06184..0926bd9 100644 --- a/flashcat-crash/CHANGELOG.md +++ b/flashcat-crash/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.6.0 + +- Version bump to keep the SDK packages in lockstep (see `@flashcatcloud/rum` + 0.6.0: remote configuration). + ## 0.5.1 - Version bump to keep the SDK packages in lockstep (see `@flashcatcloud/rum` diff --git a/flashcat-crash/oh-package.json5 b/flashcat-crash/oh-package.json5 index a6f4d0b..e3a488b 100644 --- a/flashcat-crash/oh-package.json5 +++ b/flashcat-crash/oh-package.json5 @@ -1,12 +1,12 @@ { name: "@flashcatcloud/crash", - version: "0.5.1", + version: "0.6.0", description: "FlashCat HarmonyOS crash reporting: hiAppEvent APP_CRASH (native + ArkTS) + APP_FREEZE, reported as RUM is_crash errors.", main: "Index.ets", license: "Apache-2.0", author: "FlashCat (https://flashcat.cloud)", repository: "https://github.com/flashcatcloud/fc-sdk-harmony", dependencies: { - "@flashcatcloud/core": "0.5.1" + "@flashcatcloud/core": "0.6.0" } } diff --git a/flashcat-crash/src/test/CrashEventMapper.test.ets b/flashcat-crash/src/test/CrashEventMapper.test.ets index ba8f144..7518d94 100644 --- a/flashcat-crash/src/test/CrashEventMapper.test.ets +++ b/flashcat-crash/src/test/CrashEventMapper.test.ets @@ -137,7 +137,7 @@ export default function crashEventMapperTests(): void { 'TypeError: boom\n at run (Index.ets:1:2)', 'fp-1', JsCrashPolicy.REPORT_THEN_EXIT, - '0.5.1', + '0.6.0', 'session-1', 'view-1', 'Home'); @@ -163,7 +163,7 @@ export default function crashEventMapperTests(): void { 'TypeError: boom\n at run (Index.ets:1:2)', 'fp-recovered', JsCrashPolicy.REPORT_AND_RECOVER, - '0.5.1', + '0.6.0', 'session-1', 'view-1', 'Home'); diff --git a/flashcat-crash/src/test/CrashIncident.test.ets b/flashcat-crash/src/test/CrashIncident.test.ets index 9e4e719..de4e9ea 100644 --- a/flashcat-crash/src/test/CrashIncident.test.ets +++ b/flashcat-crash/src/test/CrashIncident.test.ets @@ -45,7 +45,7 @@ export default function crashIncidentTests(): void { it('roundTripsViewUrlThroughSerialization', TestType.FUNCTION | Size.SMALLTEST | Level.LEVEL0, (): void => { const record: CrashIncidentRecord = new CrashIncidentRecord( 'inc-1', 1000, 'Error', 'boom', 'Error: boom\n at f (a.ets:1:1)', 'fp-1', - JsCrashPolicy.REPORT_THEN_EXIT, '0.5.1', 's-1', 'v-1', 'Home', 'pages/Home'); + JsCrashPolicy.REPORT_THEN_EXIT, '0.6.0', 's-1', 'v-1', 'Home', 'pages/Home'); const parsed: CrashIncidentRecord | null = CrashIncidentRecord.parse(record.serialize()); @@ -162,7 +162,7 @@ export default function crashIncidentTests(): void { 'TypeError: boom\n at run (Index.ets:1:2)', 'fp-1', JsCrashPolicy.REPORT_THEN_EXIT, - '0.5.1', + '0.6.0', 'session-1', 'view-1', 'Home'); @@ -178,7 +178,7 @@ export default function crashIncidentTests(): void { expect(parsed.stack.indexOf('Index.ets')).assertLarger(-1); expect(parsed.fingerprint).assertEqual('fp-1'); expect(parsed.policy).assertEqual(JsCrashPolicy.REPORT_THEN_EXIT); - expect(parsed.sdkVersion).assertEqual('0.5.1'); + expect(parsed.sdkVersion).assertEqual('0.6.0'); expect(parsed.sessionId).assertEqual('session-1'); expect(parsed.viewId).assertEqual('view-1'); expect(parsed.viewName).assertEqual('Home'); diff --git a/flashcat-rum/CHANGELOG.md b/flashcat-rum/CHANGELOG.md index 0d4309f..bd471e0 100644 --- a/flashcat-rum/CHANGELOG.md +++ b/flashcat-rum/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## 0.6.0 + +- **Remote configuration.** `RumConfigurationBuilder.setRemoteConfigurationEnabled(true)` + lets the session sample rate and a `custom` map be changed from the console + without releasing the app again. Off by default. The SDK fetches the + configuration at startup, at every new session and, when the console allows + it, on return to foreground; a failed or malformed response never changes the + values in use. A new rate applies from the next session, unless the console + asks for it immediately or it switches collection on or off. +- `RumConfigurationBuilder.setBeforeSampling(callback)` gives the app the last + word on the rate a session is drawn with, for example an allow-list driven by + `custom`. It runs synchronously on the calling thread: keep it light, and do + not report RUM events from inside it. +- `RumMonitor.setForcedSession()` keeps every session from then on, and + `RumMonitor.getRemoteConfig()` returns the delivered `custom` map. +- View events now report the sample rate their session was drawn with + (`_dd.configuration.session_sample_rate`), also when remote configuration is + off, and the configuration version (`rc_version`) when one decided it. +- Fixed: ending a session that had already expired, for example `stopSession()` + after a long time in the background, credited the idle gap to the last + view's `time_spent`. + +### Breaking + +- `RumMonitor` gains `setForcedSession()` and `getRemoteConfig()`. Only code + that implements `RumMonitor` itself needs to add them. + ## 0.5.1 - App freezes (`APP_FREEZE`) are now reported with `error.category: "ANR"` diff --git a/flashcat-rum/oh-package.json5 b/flashcat-rum/oh-package.json5 index 04db192..59514ea 100644 --- a/flashcat-rum/oh-package.json5 +++ b/flashcat-rum/oh-package.json5 @@ -1,12 +1,12 @@ { name: "@flashcatcloud/rum", - version: "0.5.1", + version: "0.6.0", description: "FlashCat HarmonyOS RUM: views, actions, resources, errors, sessions.", main: "Index.ets", license: "Apache-2.0", author: "FlashCat (https://flashcat.cloud)", repository: "https://github.com/flashcatcloud/fc-sdk-harmony", dependencies: { - "@flashcatcloud/core": "0.5.1" + "@flashcatcloud/core": "0.6.0" } } diff --git a/flashcat-rum/src/test/RemoteConfig.test.ets b/flashcat-rum/src/test/RemoteConfig.test.ets index 40bac93..70a241b 100644 --- a/flashcat-rum/src/test/RemoteConfig.test.ets +++ b/flashcat-rum/src/test/RemoteConfig.test.ets @@ -32,7 +32,7 @@ function testContext(appVersion: string = '1.0.0'): FlashcatContext { version: appVersion, bundleId: 'com.example.demo', source: 'harmony', - sdkVersion: '0.5.1', + sdkVersion: '0.6.0', device: { brand: 'HUAWEI', model: 'Pura', osName: 'HarmonyOS', osVersion: 'NEXT', apiVersion: 18, deviceType: 'phone' @@ -686,7 +686,7 @@ export default function remoteConfigTests(): void { it('buildsTheConfigUrlTheEngineAnswers', TestType.FUNCTION | Size.SMALLTEST | Level.LEVEL0, (): void => { const url: string = buildConfigUrl('https://intake.example.com/', 'ct 123', testContext('2.3.4')); expect(url).assertEqual( - 'https://intake.example.com/api/v2/rum/config?client_token=ct%20123&sdk=harmony&env=prod&app_version=2.3.4&sdk_version=0.5.1'); + 'https://intake.example.com/api/v2/rum/config?client_token=ct%20123&sdk=harmony&env=prod&app_version=2.3.4&sdk_version=0.6.0'); }); }); diff --git a/flashcat-rum/src/test/SessionLifecycle.test.ets b/flashcat-rum/src/test/SessionLifecycle.test.ets index 10590fb..25835f0 100644 --- a/flashcat-rum/src/test/SessionLifecycle.test.ets +++ b/flashcat-rum/src/test/SessionLifecycle.test.ets @@ -17,7 +17,7 @@ function testContext(): FlashcatContext { version: '1.0.0', bundleId: 'com.example.demo', source: 'harmony', - sdkVersion: '0.5.1', + sdkVersion: '0.6.0', device: { brand: 'HUAWEI', model: 'Pura', osName: 'HarmonyOS', osVersion: 'NEXT', apiVersion: 18, deviceType: 'phone' diff --git a/flashcat-trace/CHANGELOG.md b/flashcat-trace/CHANGELOG.md index 6bbf777..33fe1e5 100644 --- a/flashcat-trace/CHANGELOG.md +++ b/flashcat-trace/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.6.0 + +- Version bump to keep the SDK packages in lockstep (see `@flashcatcloud/rum` + 0.6.0: remote configuration). + ## 0.5.1 - Version bump to keep the SDK packages in lockstep (see `@flashcatcloud/rum` diff --git a/flashcat-trace/oh-package.json5 b/flashcat-trace/oh-package.json5 index 7dd05f8..bbac469 100644 --- a/flashcat-trace/oh-package.json5 +++ b/flashcat-trace/oh-package.json5 @@ -1,12 +1,12 @@ { name: "@flashcatcloud/trace", - version: "0.5.1", + version: "0.6.0", description: "FlashCat HarmonyOS trace-context propagation: W3C traceparent generation + rcp interceptor + manual headers.", main: "Index.ets", license: "Apache-2.0", author: "FlashCat (https://flashcat.cloud)", repository: "https://github.com/flashcatcloud/fc-sdk-harmony", dependencies: { - "@flashcatcloud/core": "0.5.1" + "@flashcatcloud/core": "0.6.0" } }