Migration guides¶
Use these guides to update a project from an earlier version of Kanzi Monitor to Kanzi Monitor 1.41.3. Follow the section for the version you are coming from. Each step says what to change or what to know; the linked pages explain the details.
Migrating from Kanzi Monitor 1.41.2 to 1.41.3¶
Kanzi Monitor 1.41.3 is built for the same Kanzi 4.1 generation as 1.41.2, so no Kanzi engine migration is involved. Each of Kanzi 4.1.0, 4.1.1 and 4.1.2 has its own Kanzi Monitor package: use the package for the Kanzi version your application uses. No configuration key or console command was removed or renamed.
What to change:
Breakpoint targets.
debug.breakproprefuses a target it used to accept: a vector needs exactly one number per component, anintmust fit in 32 bits, and afloatmust be finite. Update a script or a saved breakpoint that relied on the old reading; it was watching a value other than the one it named. In C++,DebugService::addPropertyBreakpoint()returns 0 for such a target (KZMON-687, KZMON-761).Metaclass listing.
overwatch.metaclassesno longer lists the unnamed concept template instantiations (unnamedOmittedcounts them).baseis never an empty string: it is the nearest named ancestor, ornullfor a root, androotCountcounts only real roots. Update a client that keyed on an emptybaseor on the unnamed rows. See Reading the type graph: base classes and mixins (KZMON-586).String values.
overwatch.setprop,overwatch.setresourceprop,overwatch.setrenderpassprop,overwatch.setdata,overwatch.dispatchmessage,nodetree.addcomponent,nodetree.setcomponentpropandresource.createrefuse a string that is not valid UTF-8. A value that starts with a quote is a quoted value only when one pair of quotes encloses all of it, and a quoted argument must end at its closing quote followed by a space:"a"bis refused. Text that starts with$"is now a string literal; to pass such text as it is, write it as a literal. See Setting any text: the string literal (KZMON-901).Resource addressing. Address a resource by its handle, which every resource listing reports. An index is deprecated, and a reply to a command whose resource was named by index carries
deprecation.overwatch.resourcepropsandoverwatch.setresourceprop, which are new in this release, refuse an index with"error": "Index not accepted": a stale index would name another resource, and forsetresourcepropthat is a write to the wrong resource that reports success.overwatch.resourceinfo,texturepreview,renderpasspreview,renderpasspropsandresourcepropsrefuse an argument they do not take, and amaxDimthat is not a whole number of 0 or more. See Addressing a resource (KZMON-912, KZMON-922, KZMON-945, KZMON-947).profcats.
profcatswithout an argument reports how many profiling categories are enabled, where it answered<No data>. Update a script that parsed the old answer (KZMON-874).Your own plugin on Linux. A plugin of your own that links
libkzmonitor.somust export its owncreateModule. See Integrating Kanzi Monitor into existing projects (KZMON-878).Package manifest. The manifest sidecar beside each platform package is named
<package>.delivery_manifest.yaml, where it was<package>.manifest.yaml, and carriesmanifest_version: 2. Update a pipeline that picks the sidecar up by name or reads its keys (KZMON-775, KZMON-805, KZMON-933).C++ API.
RemoteConsoleno longer derives fromConsole. Its constructor takes the connection limit,RemoteConsole(kanzi::Domain* domain, int serverPort, int maxConnections), and its destructor is no longer virtual. Its stream-buffer helpers in the same header changed too:SocketWriteBuftakes anOutboundQueue. Update code that creates aRemoteConsole, uses it as aConsole, or uses those helpers directly.findNodeByPath()is removed fromkanzimonitor_util.hpp: usefindNodeSharedByPath(), which returns akanzi::NodeSharedPtr(KZMON-823, KZMON-948).
What to know:
Linux x86-64 host for |k| 4.1.2. The Kanzi Monitor package for Kanzi 4.1.2 needs a host with glibc 2.35 and GLIBCXX 3.4.30, such as Ubuntu 22.04 or newer, because the Kanzi 4.1.2 engine libraries do. On an older host the plugin fails to load with a
version ... not founderror naming aGLIBC_orGLIBCXX_version. The packages for Kanzi 4.1.0 and 4.1.1 run on the hosts their engines run on (KZMON-979).Console responses are UTF-8. Non-ASCII text in a JSON response arrives as UTF-8. On Windows, and on x86 and x86-64 Linux and Android, each byte used to arrive as its own
\u00XXescape. Remove any client workaround that re-decoded those escapes (KZMON-925).Perfetto timestamps. The
perfettowriter emits session-relative timestamps, aschrometracedoes, and records the base in the trace. A custom tool that needs the engine-clock value adds the base back. See Using the Profiling Trace service (KZMON-690).kzTrace on Android. When Kanzi Monitor cannot resolve the application’s files directory,
overwatch.kztracerefuses the capture instead of letting the engine write to/sdcard/Download/. Collect kzTrace output from the application’s files directory, not from/sdcard/Download/, and retry a refused capture once the application’s Java entry point has run. See kzTrace: engine-native tracing (KZMON-764).
Migrating from Kanzi Monitor 1.41.1 to 1.41.3¶
Apply the steps below, then all of the “Migrating from Kanzi Monitor 1.41.2 to 1.41.3” steps above. Kanzi Monitor 1.41.2 was built for the same Kanzi 4.1 generation, so no Kanzi engine migration is involved.
Log buffer access.
KanziMonitorLogger::getLog(), which returned a reference to the log container, is removed, because the buffer is now guarded by a lock that a returned reference would outlive. Use:Before
Now
logger->getLog()and iteratelogger->withLog([](const kanzi::list<LogEntry>& log) { ... })logger->getLog().size()logger->getEntryCount()setMaxEntries()then pop the excess yourselfsetMaxEntries(), which trims to the new cap itselfwithLog()runs your visitor while the lock is held: keep it short, do not store the reference, and do not call back into the logger from it. Only C++ code that reads the buffer directly is affected. See Using the Log service (KZMON-629).Node paths. A path that resolves to no node returns
Node not found, where any single-segment path, such as/or/anything, used to answer for the first view root. Address nodes by the pathoverwatch.nodesreports, which equals the engine’sNode.Path. The unqualified/<rootName>/childform still works (KZMON-620).Node property listings.
overwatch.props, and the MCPget_node_propertiestool, return only the properties set on the node, those with aprecedenceoflocal: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;
storage.nonecounts themno way to tell a set value from storage
each entry carries
"precedence":"local"overwatch.props <path>unchanged; add
precedence=allfor the full listing, each entry labelledSee Understanding what overwatch.props reports (KZMON-633).
Screenshot polling.
overwatch.screenshotreports a capture that has not completed as"status":"pending", where it said"scheduled". Poll forpending, and treat a status you do not recognize as unfinished. A capture now has a deadline: checkframesRenderedbefore using the pixels (KZMON-622).
Migrating from Kanzi Monitor 1.41.0 to 1.41.3¶
Apply the steps below, then all of the “Migrating from Kanzi Monitor 1.41.1 to 1.41.3” steps above.
Performance watcher comparison enum. The
WatcherComparisonenumerators are renamed:BelowtoBelowThresholdandAbovetoAboveThreshold, because X11 headers define the old names as macros. Update C++ code that uses the enum, such as a call toPerformanceService::addWatcher(). Thewatchercommand, the Overwatch JSON, the Web UI and the MCPadd_watchertool still use"below"and"above"(KZMON-504).chrometrace timestamps. The
chrometracewriter emits session-relative timestamps, with the first event at 0, andtsandduras fractional microseconds. Update a custom tool that reads trace files if it relied on absolute or integer values. See Using the Profiling Trace service (KZMON-505, KZMON-506).
Migrating from Kanzi Monitor 1.40.0 to 1.41.3¶
Apply the steps below, then all of the “Migrating from Kanzi Monitor 1.41.0 to 1.41.3” steps above. Kanzi Monitor 1.40.x is built for the Kanzi 4.0 generation, and 1.41.x for the Kanzi 4.1 generation.
Engine SDK. Kanzi Monitor 1.41.x requires a Kanzi 4.1 release. The engine update itself is covered by the Kanzi SDK migration guide (4.0 → 4.1); this guide covers only the Kanzi Monitor steps.
Build integration. The application
CMakeLists.txtthat Kanzi Studio 4.1.0 generates has a ready-madeif(KANZI_LINK_KZMONITOR)block: enable Kanzi Monitor with-DKANZI_LINK_KZMONITOR=ON. The manual block in Integrating Kanzi Monitor from source code and Integrating Kanzi Monitor as a prebuilt library is needed only for a project whoseCMakeLists.txtdoes not have it.Android packaging. Kanzi Monitor no longer ships an AAR and has no Java API. Remove a dependency on the
monitor-*AAR, and buildlibkzmonitor.sointo your APK with-DKANZI_LINK_KZMONITOR=ONon yourkanzinativemodule. See Integrating Kanzi Monitor as a prebuilt library.Scene-graph resolution. Remove any
setApplication(C++) orsetNativeRuntime/setNativeApplication(JNI) calls, theNodeRegisteringScreenEnabledkey, and theregisterRoot/registerNativeViewRoothook; theApplicationReferenceclass is removed. Kanzi Monitor finds the scene graph throughDomain::getScreens(), with no injection or registration.Commands.
appquitis removed: usequit.appfpsinfois renamedfpsinfo, and its header isFPS Info :.perfinfolevelis always available, and its header isPerformanceInfo level:. Theappfpsmetric is removed: usefps. Update scripts and performance watchers that use the old names or headers.Custom trace writers.
SampleCollector::registerWriterTask()andSampleCollector::clearWriterTasks()are removed. Register a writer withTraceWriterRegistryand select it by name:// 1.40.0 SampleCollector::clearWriterTasks(); SampleCollector::registerWriterTask(MyWriter::writeCollectorToFile); // 1.41 #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");
ActiveWriters = mywriterinkanzimonitor.cfgselects it too, if it is registered before the Trace service initializes; otherwise activate it in code or withoverwatch.activatewriter. See Using the Profiling Trace service.Android trace output location. Trace files go to the application’s internal files directory, typically
/data/user/0/<package>/files/, instead of/sdcard/. Drop the storage permissions if you used them only for trace output, and fetch traces withadb shell run-as <package>. See Using the Profiling Trace service.Configuration key. The frame-duration trigger key is spelled
WritingOnFrameDurationThreshold. The misspellingWritingOnFrameDurationTresholdstill works but is deprecated.Graphics API call logging. The
graphicslogandoverwatch.graphicslogcommands and theset_graphics_loggingandget_graphics_loggingMCP tools are removed: Kanzi 4.x has no engine API for them. Drop scripts that use them.
Migrating from Kanzi Monitor 1.9.x to 1.41.3¶
Migrating from 1.9.x is a superset of the 1.40.0 → 1.41.3 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.3” steps above, which in turn chain through the 1.41.0, 1.41.1 and 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.3¶
Apply every step in “Migrating from Kanzi Monitor 1.40.0 to 1.41.3” 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).