Skip to content

release(harmony): SDK 0.4.0 — axios integration and a network-stack-agnostic entry point - #22

Merged
Fiona2016 merged 2 commits into
mainfrom
release/harmony-sdk-0.4.0
Aug 12, 2026
Merged

release(harmony): SDK 0.4.0 — axios integration and a network-stack-agnostic entry point#22
Fiona2016 merged 2 commits into
mainfrom
release/harmony-sdk-0.4.0

Conversation

@Fiona2016

@Fiona2016 Fiona2016 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Bumps the SDK packages to 0.4.0 and adds a fifth published package.

Why the minor position

This release removes FlashcatHttp.hostOf(). A patch number would hide a removal from anyone who upgrades without reading the changelog.

What ships

@flashcatcloud/axios — new package. Reports every request made through an @ohos/axios instance as a RUM resource, with the distributed-trace headers attached:

const api = axios.create({ baseURL: 'https://api.example.com' });
trackAxios(api);

axios routes through its own @ohos.net.http adapter, which neither the rcp interceptor nor FlashcatHttp observes. Applications previously had to copy an interceptor file into their own repository and keep it in sync. Its own package rather than part of trace, because folding a third-party dependency in there would make every user of that package install axios — the same reason the Android SDK ships an integration module per library instead of pulling them into the core.

@flashcatcloud/trace

  • FlashcatTrace.startTracedResource(url, method, injectTrace?) + stopTracedResource / failTracedResource: report a request as a RUM resource from any network stack the SDK cannot instrument itself. Consent and first-party gating, sampled-only trace correlation and the decimal _dd.span_id encoding are handled inside the SDK. Requires setTrackNetworkRequests(true), like every other network path. The axios package is a thin layer over this; ky and custom stacks use it directly.
  • FlashcatHttp builds on the same entry point instead of duplicating the logic.
  • Breaking: FlashcatHttp.hostOf() removed — host parsing moved behind the first-party gate and the method had no callers left. It was a URL helper on a public class with no SDK state behind it.

@flashcatcloud/rumREADME.md called FlashcatRum.startView(), which does not exist on that class. READMEs travel inside the published package, so anyone following the quickstart hit a compile error. Corrected to GlobalRumMonitor.get().startView().

core and crash are lockstep bumps.

Verification

  • 135 unit tests pass across 16 files; assembleHap clean.
  • Emulator end-to-end, with the demo consuming @flashcatcloud/axios as a package rather than a local file: two requests, two resources with the full url and statuses 200 and 404. Each _dd.span_id is the decimal form of the span in the traceparent the device actually sent, each trace flagged sampled, and no network error event for the 404.
  • Uploaded batches carry sdk_version:0.4.0.

Version strings live in three places — the oh-package manifests with their inter-package pins, Version.ets, and the test fixtures — and all move together here. HARMONY_MODULES in the publish workflow gained flashcat_axios.

Publishing is a separate manual step.

Bumps the four SDK packages to 0.4.0 and records the changes shipped since
0.3.2.

The minor rather than the patch position: this release removes
`FlashcatHttp.hostOf()`. A patch number would hide a removal from anyone who
upgrades without reading the changelog.

Version numbers live in three places — the oh-package manifests with their
inter-package pins, Version.ets, and the test fixtures carrying the version
string — and all three move together here.
Applications using axios had to copy an interceptor file into their own
repository and keep it there. `@flashcatcloud/axios` makes the integration one
call — `trackAxios(instance)` — with nothing to vendor and nothing to re-sync
when the SDK changes.

Its own package rather than part of trace: axios is a third-party dependency,
and folding it into `@flashcatcloud/trace` would make every user of that
package install axios whether or not they use it. This mirrors the Android SDK,
which ships an integration module per third-party library rather than pulling
them into the core.

The package is a thin layer over `startTracedResource` — resolving the url
axios will actually request, copying the returned headers onto the config, and
carrying the resource key between the request and response interceptors. Every
rule that matters stays in the SDK.

Also here, because both ship with this release:

- `flashcat-rum/README.md` called `FlashcatRum.startView()`, which does not
  exist on that class. READMEs travel inside the published package, so anyone
  following the quickstart hit a compile error. Corrected to
  `GlobalRumMonitor.get().startView()`.
- The headless test runner learned the new module and how to resolve
  `@flashcatcloud/trace`.
@Fiona2016 Fiona2016 changed the title release(harmony): SDK 0.4.0 — report resources from any network stack release(harmony): SDK 0.4.0 — axios integration and a network-stack-agnostic entry point Aug 12, 2026
@Fiona2016
Fiona2016 merged commit 2970280 into main Aug 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant