telemetry: refactor