8. Telemetry Management#
8.1. setupTelemetry#
Configures the telemetry output stream for logging and monitoring.
static void setupTelemetry(bool use_OTEL, std::ostream* os);
Parameters:
use_OTEL: Request OpenTelemetry integration when OpenTelemetry support is built in.os: Output stream for telemetry data.
Valid values:
Parameter |
Value |
Description |
|---|---|---|
|
|
Use stream telemetry through |
|
|
Request OpenTelemetry telemetry when OpenTelemetry support is built in. |
Notes:
Call
setupTelemetry()before creating the firstcuObjClientobject. Current behavior applies the setting when the telemetry object is created.If OpenTelemetry support is not built in, stream telemetry is used.
osmust be non-null when stream logging is used.Call
shutdownTelemetry()before closingos.osmust remain valid until allcuObjClientobjects are destroyed.
8.2. shutdownTelemetry#
Shuts down telemetry and resets the default output stream.
static void shutdownTelemetry();
Notes:
Call this API before closing custom output streams.
Telemetry is fully closed when all
cuObjClientobjects are destroyed.
8.3. setTelemFlags#
Configures telemetry logging flags.
static void setTelemFlags(unsigned flags);
Parameters:
flags: Bitmask of telemetry logging flags.
Valid values:
Flag |
Value |
Description |
|---|---|---|
|
|
Enables informational telemetry messages. |
|
|
Enables debug telemetry messages. |
|
|
Enables error telemetry messages. |
Flags may be combined with bitwise OR. For example:
cuObjClient::setTelemFlags(CUOBJ_LOG_PATH_ERROR | CUOBJ_LOG_PATH_INFO);
Passing 0 disables info, debug, and error telemetry messages. Bits other
than the valid values listed above have no defined effect.
Notes:
Call
setTelemFlags()before creating the firstcuObjClientobject. Current behavior applies the flags when the telemetry object is created.This API does not return a status value.