(to10.3-telemetry)=

# Telemetry changes

PyTango's telemetry support was substantially reworked in 10.3.0 to match the
telemetry implementation in cppTango 10.3.0. The full details and worked examples
live in the [telemetry how-to guide](#telemetry-howto); this section only
summarises what you may need to change.

(to10.3-telemetry-env-vars)=

## Renamed environment variables

The telemetry environment variables now match cppTango 10.3.0.
The old names are ignored for configuration, as they are in cppTango.
PyTango 10.3.0 and 10.3.1 emit deprecation warnings,
but the warnings were removed in PyTango 10.3.2.

| Old name (ignored)                | New name                            |
|-----------------------------------|-------------------------------------|
| `TANGO_TELEMETRY_TRACES_EXPORTER` | `TANGO_TELEMETRY_TRACING_EXPORTERS` |
| `TANGO_TELEMETRY_TRACES_ENDPOINT` | `TANGO_TELEMETRY_TRACING_ENDPOINTS` |
| `TANGO_TELEMETRY_LOGS_EXPORTER`   | `TANGO_TELEMETRY_LOGGING_EXPORTERS` |
| `TANGO_TELEMETRY_LOGS_ENDPOINT`   | `TANGO_TELEMETRY_LOGGING_ENDPOINTS` |

Update your environment to the new names. See the
[telemetry how-to guide](#telemetry-howto) for a complete example.

## Runtime configuration

Device telemetry can now be reconfigured at runtime instead of being treated as an
import-time-only setup on the Python side. PyTango recreates or replaces its Python
tracer providers when the cppTango runtime configuration changes. Note that for pure
client scripts, the telemetry configuration is still based on the environment
variables at import time. See the
[runtime configuration how-to](#telemetry-howto-runtime).

Missing OpenTelemetry Python dependencies now warn only when telemetry is actually
requested, rather than at import time.

## Topics replace kernel tracing

cppTango telemetry has switched to "topics". The
`tango.server.Device.set_kernel_tracing_enabled()` and
`tango.server.Device.is_kernel_tracing_enabled()` methods have been **removed** —
they should not have been available from within a device. To include the kernel
(BaseDevice) spans, clients now enable the telemetry topic `"all"` instead. See
[telemetry topics](#telemetry-howto-topics).
