Migration guides¶
Use these guides to update a project from an earlier version of Kanzi Monitor to Kanzi Monitor 1.41.2. Follow the section for the version you are coming from.
Migrating from Kanzi Monitor 1.41.1 to 1.41.2¶
Kanzi Monitor 1.41.2 is a maintenance release on the same Kanzi 4.1 generation as 1.41.1, so no Kanzi engine migration is involved, and no configuration key or console command changed. Three changes can need attention: one in the C++ API, for an integration that reads Kanzi Monitor’s log buffer directly; one in node path resolution, for a script or tool that addresses nodes by path; and one in the Overwatch JSON, for anything that reads node property listings.
Log buffer access.
KanziMonitorLogger::getLog(), which returned a reference to the log container, is removed. It is replaced by:Before
Now
logger->getLog()and iteratelogger->withLog([](const kanzi::list<LogEntry>& log) { ... })logger->getLog().size()logger->getEntryCount()setMaxEntries()then pop the excess yourselfsetMaxEntries()— it trims to the new cap itselfThis affects only C++ code that reads the buffer directly; the
loginfoandoverwatch.logscommands, the Web UI Logs tab, and the MCPget_logstool are unchanged.Kanzi Monitor ships its
include/directory in every package, sokanzimonitor_logger.hppis public surface and this is a breaking change in a patch release. It is made deliberately: the buffer is written from several threads — the main thread, the remote console reader thread on every accept, and the local console reader thread — and was previously mutated with no lock at all. It is now guarded by a mutex, and an accessor that hands out a reference cannot be made safe by that mutex, because the reference outlives the lock. KeepinggetLog()would have kept the defect reachable through the public API.withLog()runs your visitor while the lock is held, so keep it short, do not store the reference, and do not call back into the logger from inside it (KZMON-629).Node paths. A path that resolves to no node now returns
Node not found. Previously any single-segment path —/or/anything— resolved to the first view root, sooverwatch.propsandoverwatch.setpropanswered for that root when given a path that pointed nowhere, and a caller could not tell a deliberate root query from a malformed one. Address nodes by the pathoverwatch.nodesreports: it equals the engine’s ownNode.Path, and every reported path now resolves. Update a script that relied on the fallback, or that addresses a node by a name the node no longer has — for example after settingNode.Name, which changes the node’s path. The unqualified/<rootName>/childform still works. On a host with more than one view tree this is a fix rather than a restriction: previously no reported path resolved at all and only the first tree was reachable (KZMON-620).Node property listings.
overwatch.props, and the MCPget_node_propertiestool over it, now return only the properties a project set on a node — those with aprecedenceoflocal. They previously returned the node’s whole property storage, which includes entries no one set.Adapt a script or tool that reads these listings:
Before
Now
properties[]held every storage entryproperties[]holds only local values; the rest are counted instoragean entry with
"value":nullmeant “storage exists, no value”such entries are not listed at all;
storage.nonecounts themno way to tell a set value from storage
each entry carries
"precedence":"local"overwatch.props <path>unchanged; add
precedence=allfor the old, now-labelled, full listingNothing is lost:
precedence=allreturns every entry, and each one names the precedence level that supplies its value —local,style,modified,classDefault, ornonefor storage with no input into the value at all. These follow Kanzi’s own property precedence order; see Understanding what overwatch.props reports. Thebindingfield is unchanged and remains independent ofprecedence— a bound property is usuallylocal, but a resource binding can leave the value coming from the class default (KZMON-633).
Migrating from Kanzi Monitor 1.41.0 to 1.41.2¶
Migrating from 1.41.0 is a superset of the 1.41.1 → 1.41.2 path: apply the steps below, then all of the “Migrating from Kanzi Monitor 1.41.1 to 1.41.2” steps above.
Kanzi Monitor 1.41.1 was a maintenance release on the same Kanzi 4.1 generation as 1.41.0, so no Kanzi engine migration is involved, and no configuration key, console command, or Overwatch JSON field changed. Two changes can need attention: one in the C++ API, for an integration that calls the plugin directly, and one in the chrometrace trace file format, for a custom tool that parses trace output.
Performance watcher comparison enum. The
WatcherComparisonenumerators are renamed:Below→BelowThresholdandAbove→AboveThreshold. X11 headers, which the Kanzi engine pulls in onlinux_x11,#defineBelowandAboveas integer constants and textually clobbered the old names. This affects only C++ code that uses the enum directly — a call toPerformanceService::addWatcher(), or a read ofPerformanceWatcher::comparison— so update those call sites to the new enumerator names. Nothing else changes: thewatcherconsole command, the Overwatch JSON, the Monitor Web UI, and the MCPadd_watchertool all still use the"below"/"above"strings, so scripts,kanzimonitor.cfgfiles, and existing watcher definitions need no changes (KZMON-504).Trace timestamps. The
chrometracewriter now emits session-relative timestamps — the first event starts at 0 — instead of the platform’s absolute engine-clock values, and emitstsandduras fractional microseconds rather than integers. The Perfetto trace viewer and the bundled tools need no changes. Update a custom tool that reads Kanzi Monitor trace files if it relies ontsbeing an absolute (since-boot or since-epoch) value, or assumes integerts/dur. Theperfettoandperfetto-producerwriters are unchanged;perfetto-producerkeeps absolute timestamps by design, so its events stay aligned with the rest of the system timeline (KZMON-505, KZMON-506).
Migrating from Kanzi Monitor 1.40.0 to 1.41.2¶
Migrating from 1.40.0 is a superset of the 1.41.0 → 1.41.2 path: apply the steps below, then all of the “Migrating from Kanzi Monitor 1.41.0 to 1.41.2” steps above.
Kanzi Monitor 1.40.x is built for the Kanzi 4.0 generation; 1.41.x is built for the Kanzi 4.1 generation. A given 1.41.x release is compatible with the Kanzi 4.1.y releases available at the time; the release notes list the supported Kanzi versions and call out any exceptions.
Engine SDK. Kanzi Monitor 1.41.x requires a Kanzi 4.1 release. Updating the Kanzi Engine SDK from the 4.0 to the 4.1 generation — and any application changes the engine update itself requires — is covered by the Kanzi SDK migration guide (4.0 → 4.1); this guide covers only the Kanzi Monitor-specific steps.
Build integration. The application
CMakeLists.txtgenerated by Kanzi Studio 4.1.0 ships a ready-madeif(KANZI_LINK_KZMONITOR)detection and linking block; enable Kanzi Monitor by passing-DKANZI_LINK_KZMONITOR=ON. The manual block documented in Integrating Kanzi Monitor from source code and Integrating Kanzi Monitor as a prebuilt library is only needed for projects that predate 4.1.0 or whose generatedCMakeLists.txtdoes not already contain it.Android packaging. Kanzi Monitor no longer ships an AAR. If your integration depended on the
monitor-*AAR — for the bundledlibkzmonitor.soor the Java API — remove that dependency. Kanzi Monitor exposes no Java API; buildlibkzmonitor.sointo your APK by passing-DKANZI_LINK_KZMONITOR=ONto yourkanzinativemodule. See Integrating Kanzi Monitor as a prebuilt library.Scene-graph resolution. Remove any
setApplication(C++) orsetNativeRuntime/setNativeApplication(Java JNI) injection calls, theNodeRegisteringScreenEnabledconfiguration key, and theregisterRoot/registerNativeViewRootview-root hook (theApplicationReferenceclass is removed). Kanzi Monitor discovers the scene graph throughDomain::getScreens()— a stock Kanzi 4.1 host, including droidfw’s multiple views, needs no injection or registration.Commands.
appquitis removed — usequit(it stops the same main loop).appfpsinfois renamed tofpsinfo(same value; output header changed fromApplication Performance Info :toFPS Info :).perfinfolevelkeeps its name but is now always available (header changed fromApplication PerformanceInfo level:toPerformanceInfo level:). Theappfpsmetric is removed — usefps. Update any scripts and performance watchers that referenced the old names or headers.Custom trace writers. The public
SampleCollector::registerWriterTask()/SampleCollector::clearWriterTasks()symbols are removed. Register writers throughTraceWriterRegistryand select them by name:// 1.40.0 SampleCollector::clearWriterTasks(); SampleCollector::registerWriterTask(MyWriter::writeCollectorToFile); // 1.41.0 #include "profilinghelper_writerregistry.hpp" TraceWriterRegistry::registerWriter( "mywriter", "Custom writer (one-line human description).", MyWriter::writeCollectorToFile); TraceWriterRegistry::deactivate("chrometrace"); // optional: remove the default TraceWriterRegistry::activate("mywriter");
A writer registered this way can also be selected from
kanzimonitor.cfgviaActiveWriters = mywriter. The selection is applied once duringTraceService::initialize(), so it covers only writers already registered at that point; a writer registered by a plugin module whoseinitialize()runs after the Trace Service’s must activate itself viaTraceWriterRegistry::activate()or at runtime viaoverwatch.activatewriter. See Using the Profiling Trace service.Android trace output location. Trace files now go to the host application’s internal files directory (
Context.getFilesDir(), typically/data/user/0/<package>/files/, resolved at runtime via JNI) instead of/sdcard/. Drop theMANAGE_EXTERNAL_STORAGE/WRITE_EXTERNAL_STORAGEpermissions if you used them only for trace output, and update device-side scripts — useadb shell run-as <package> ls files/andadb shell run-as <package> cat files/<trace>.json > <trace>.json.Configuration key. The frame-duration trigger key is now spelled
WritingOnFrameDurationThreshold; the 1.40.0 misspellingWritingOnFrameDurationTresholdstill works as a deprecated alias, but switch to the correct spelling.Graphics API call logging. The
graphicslog/overwatch.graphicslogcommands and theset_graphics_logging/get_graphics_loggingMCP tools carried into the 4.0 line were non-functional (Kanzi 4.x dropped the underlying engine API) and are now removed. Drop any scripts that invoked them.
Migrating from Kanzi Monitor 1.9.x to 1.41.2¶
Migrating from 1.9.x is a superset of the 1.40.0 → 1.41.2 migration: apply the 1.9.x → 1.40.0 changes below, then all of the “Migrating from Kanzi Monitor 1.40.0 to 1.41.2” steps above — which in turn end with the 1.41.0 → 1.41.2 and 1.41.1 → 1.41.2 steps. (1.9.x targets Kanzi 3.9; 1.40.x targets Kanzi 4.0; 1.41.x targets Kanzi 4.1.)
1.9.x to 1.40.0¶
Kanzi Monitor 1.40.0 was essentially 1.9.x ported to the Kanzi 4.0 SDK, API, and build system, keeping the same feature set except where the Kanzi 3.9 → 4.0 engine forced a difference. The bulk of this step is therefore the Kanzi engine port — covered by the Kanzi SDK migration guide (3.9 → 4.0), not here — and Kanzi Monitor’s own surface (plugin load order, kanzimonitor.cfg keys, command names) is unchanged. The Kanzi Monitor-specific touches are:
Build files adopt the |k| 4.0 application templates. Regenerate or adapt your application build files to the 4.0 templates. On Android the native libraries build through an NDK module (
kanzinative) and the current Gradle setup — buildlibkzmonitor.so(and any custom Monitor plugin) through that path.Enable graphics statistics. Rendering and performance stats read as zero on Kanzi 4.0 unless the graphics-statistics layer is enabled — set
graphicsStatisticsEnabled = truein your application configuration so Kanzi Monitor can report draw and triangle counts. See the Kanzi application-configuration reference.Graphics information is backend-agnostic.
graphicsinfoand the Web UI Graphics tab report Kanzi 4.0 backend-agnostic values rather than GL-specific labels; update any tooling that parsed the old GL-specific output.
1.40.0 to 1.41.2¶
Apply every step in “Migrating from Kanzi Monitor 1.40.0 to 1.41.2” above. The items most likely to affect a 1.9.x integration: the Application-injection API (setApplication / the JNI handshakes / registerRoot / ApplicationReference) is removed in favor of Domain::getScreens(); the app-prefixed commands are renamed (appfpsinfo → fpsinfo, appquit → quit, appfps → fps); custom trace writers move from SampleCollector to TraceWriterRegistry / ActiveWriters; and the graphics API call logging that worked on 1.9.x is not available (Kanzi 4.x dropped the engine API).